aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_assists/src/assists/add_import.rs
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-02-06 15:58:57 +0000
committerAleksey Kladov <[email protected]>2020-02-06 16:12:02 +0000
commitcf812c12d1ac7944d1c18877ee93bea02d91e99f (patch)
tree71e13733941e2c0520cfe5d16fb00f428f3233da /crates/ra_assists/src/assists/add_import.rs
parentf8965ffafd5cf467b3f0482ca962ba2bfd090161 (diff)
Assists are not generic
Diffstat (limited to 'crates/ra_assists/src/assists/add_import.rs')
-rw-r--r--crates/ra_assists/src/assists/add_import.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_assists/src/assists/add_import.rs b/crates/ra_assists/src/assists/add_import.rs
index fc038df78..f03dddac8 100644
--- a/crates/ra_assists/src/assists/add_import.rs
+++ b/crates/ra_assists/src/assists/add_import.rs
@@ -1,4 +1,4 @@
1use hir::{self, db::HirDatabase, ModPath}; 1use hir::{self, ModPath};
2use ra_syntax::{ 2use ra_syntax::{
3 ast::{self, NameOwner}, 3 ast::{self, NameOwner},
4 AstNode, Direction, SmolStr, 4 AstNode, Direction, SmolStr,
@@ -50,7 +50,7 @@ pub fn auto_import_text_edit(
50// 50//
51// fn process(map: HashMap<String, String>) {} 51// fn process(map: HashMap<String, String>) {}
52// ``` 52// ```
53pub(crate) fn add_import(ctx: AssistCtx<impl HirDatabase>) -> Option<Assist> { 53pub(crate) fn add_import(ctx: AssistCtx) -> Option<Assist> {
54 let path: ast::Path = ctx.find_node_at_offset()?; 54 let path: ast::Path = ctx.find_node_at_offset()?;
55 // We don't want to mess with use statements 55 // We don't want to mess with use statements
56 if path.syntax().ancestors().find_map(ast::UseItem::cast).is_some() { 56 if path.syntax().ancestors().find_map(ast::UseItem::cast).is_some() {