diff options
Diffstat (limited to 'crates/ra_assists/src/handlers/add_custom_impl.rs')
-rw-r--r-- | crates/ra_assists/src/handlers/add_custom_impl.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/crates/ra_assists/src/handlers/add_custom_impl.rs b/crates/ra_assists/src/handlers/add_custom_impl.rs index 4ea26a550..869d4dc04 100644 --- a/crates/ra_assists/src/handlers/add_custom_impl.rs +++ b/crates/ra_assists/src/handlers/add_custom_impl.rs | |||
@@ -48,9 +48,8 @@ pub(crate) fn add_custom_impl(ctx: AssistCtx) -> Option<Assist> { | |||
48 | let label = | 48 | let label = |
49 | format!("Add custom impl '{}' for '{}'", trait_token.text().as_str(), annotated_name); | 49 | format!("Add custom impl '{}' for '{}'", trait_token.text().as_str(), annotated_name); |
50 | 50 | ||
51 | ctx.add_assist(AssistId("add_custom_impl"), label, |edit| { | 51 | let target = attr.syntax().text_range(); |
52 | edit.target(attr.syntax().text_range()); | 52 | ctx.add_assist(AssistId("add_custom_impl"), label, target, |edit| { |
53 | |||
54 | let new_attr_input = input | 53 | let new_attr_input = input |
55 | .syntax() | 54 | .syntax() |
56 | .descendants_with_tokens() | 55 | .descendants_with_tokens() |
@@ -95,7 +94,7 @@ pub(crate) fn add_custom_impl(ctx: AssistCtx) -> Option<Assist> { | |||
95 | 94 | ||
96 | #[cfg(test)] | 95 | #[cfg(test)] |
97 | mod tests { | 96 | mod tests { |
98 | use crate::helpers::{check_assist, check_assist_not_applicable}; | 97 | use crate::tests::{check_assist, check_assist_not_applicable}; |
99 | 98 | ||
100 | use super::*; | 99 | use super::*; |
101 | 100 | ||