diff options
Diffstat (limited to 'crates/ide_assists/src/handlers/auto_import.rs')
-rw-r--r-- | crates/ide_assists/src/handlers/auto_import.rs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/crates/ide_assists/src/handlers/auto_import.rs b/crates/ide_assists/src/handlers/auto_import.rs index eb8d35e95..5546c3a4e 100644 --- a/crates/ide_assists/src/handlers/auto_import.rs +++ b/crates/ide_assists/src/handlers/auto_import.rs | |||
@@ -112,9 +112,7 @@ pub(crate) fn auto_import(acc: &mut Assists, ctx: &AssistContext) -> Option<()> | |||
112 | Some(()) | 112 | Some(()) |
113 | } | 113 | } |
114 | 114 | ||
115 | pub(super) fn find_importable_node<'a>( | 115 | pub(super) fn find_importable_node(ctx: &AssistContext) -> Option<(ImportAssets, SyntaxNode)> { |
116 | ctx: &'a AssistContext, | ||
117 | ) -> Option<(ImportAssets<'a>, SyntaxNode)> { | ||
118 | if let Some(path_under_caret) = ctx.find_node_at_offset_with_descend::<ast::Path>() { | 116 | if let Some(path_under_caret) = ctx.find_node_at_offset_with_descend::<ast::Path>() { |
119 | ImportAssets::for_exact_path(&path_under_caret, &ctx.sema) | 117 | ImportAssets::for_exact_path(&path_under_caret, &ctx.sema) |
120 | .zip(Some(path_under_caret.syntax().clone())) | 118 | .zip(Some(path_under_caret.syntax().clone())) |