We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents de28baf + 423b00a commit 1fde334Copy full SHA for 1fde334
crates/ide-assists/src/handlers/remove_unused_imports.rs
@@ -67,7 +67,7 @@ pub(crate) fn remove_unused_imports(acc: &mut Assists, ctx: &AssistContext<'_>)
67
// This case maps to the situation where the * token is braced.
68
// In this case, the parent use tree's path is the one we should use to resolve the glob.
69
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(),
+ Some(parent_u) if parent_u.path().is_some() => parent_u.path()?,
71
_ => return None,
72
}
73
} else {
0 commit comments