Skip to content

Commit 423b00a

Browse files
committed
Deunwrap remove_unused_imports
1 parent b78d69c commit 423b00a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/ide-assists/src/handlers/remove_unused_imports.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ pub(crate) fn remove_unused_imports(acc: &mut Assists, ctx: &AssistContext<'_>)
6767
// This case maps to the situation where the * token is braced.
6868
// In this case, the parent use tree's path is the one we should use to resolve the glob.
6969
match u.syntax().ancestors().skip(1).find_map(ast::UseTree::cast) {
70-
Some(parent_u) if parent_u.path().is_some() => parent_u.path().unwrap(),
70+
Some(parent_u) if parent_u.path().is_some() => parent_u.path()?,
7171
_ => return None,
7272
}
7373
} else {

0 commit comments

Comments
 (0)