Skip to content

Commit 1fde334

Browse files
committed
Auto merge of rust-lang#15433 - alibektas:deunwrap/remove_unused_imports, r=lnicola
minor : Deunwrap remove_unused_imports rust-lang#15398 Subtask 3
2 parents de28baf + 423b00a commit 1fde334

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)