diff options
Diffstat (limited to 'crates/ide_assists/src/handlers')
-rw-r--r-- | crates/ide_assists/src/handlers/expand_glob_import.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ide_assists/src/handlers/expand_glob_import.rs b/crates/ide_assists/src/handlers/expand_glob_import.rs index 5b540df5c..83aa11d52 100644 --- a/crates/ide_assists/src/handlers/expand_glob_import.rs +++ b/crates/ide_assists/src/handlers/expand_glob_import.rs | |||
@@ -73,8 +73,8 @@ fn find_parent_and_path( | |||
73 | ) -> Option<(Either<ast::UseTree, ast::UseTreeList>, ast::Path)> { | 73 | ) -> Option<(Either<ast::UseTree, ast::UseTreeList>, ast::Path)> { |
74 | return star.ancestors().find_map(|n| { | 74 | return star.ancestors().find_map(|n| { |
75 | find_use_tree_list(n.clone()) | 75 | find_use_tree_list(n.clone()) |
76 | .and_then(|(u, p)| Some((Either::Right(u), p))) | 76 | .map(|(u, p)| (Either::Right(u), p)) |
77 | .or_else(|| find_use_tree(n).and_then(|(u, p)| Some((Either::Left(u), p)))) | 77 | .or_else(|| find_use_tree(n).map(|(u, p)| (Either::Left(u), p))) |
78 | }); | 78 | }); |
79 | 79 | ||
80 | fn find_use_tree_list(n: SyntaxNode) -> Option<(ast::UseTreeList, ast::Path)> { | 80 | fn find_use_tree_list(n: SyntaxNode) -> Option<(ast::UseTreeList, ast::Path)> { |