aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_assists/src/add_impl.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_assists/src/add_impl.rs')
-rw-r--r--crates/ra_assists/src/add_impl.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_assists/src/add_impl.rs b/crates/ra_assists/src/add_impl.rs
index b40b9cc0c..b292f188d 100644
--- a/crates/ra_assists/src/add_impl.rs
+++ b/crates/ra_assists/src/add_impl.rs
@@ -5,12 +5,12 @@ use ra_syntax::{
5 TextUnit, 5 TextUnit,
6}; 6};
7 7
8use crate::{AssistCtx, Assist}; 8use crate::{AssistCtx, Assist, AssistId};
9 9
10pub(crate) fn add_impl(mut ctx: AssistCtx<impl HirDatabase>) -> Option<Assist> { 10pub(crate) fn add_impl(mut ctx: AssistCtx<impl HirDatabase>) -> Option<Assist> {
11 let nominal = ctx.node_at_offset::<ast::NominalDef>()?; 11 let nominal = ctx.node_at_offset::<ast::NominalDef>()?;
12 let name = nominal.name()?; 12 let name = nominal.name()?;
13 ctx.add_action("add impl", |edit| { 13 ctx.add_action(AssistId("add_impl"), "add impl", |edit| {
14 edit.target(nominal.syntax().range()); 14 edit.target(nominal.syntax().range());
15 let type_params = nominal.type_param_list(); 15 let type_params = nominal.type_param_list();
16 let start_offset = nominal.syntax().range().end(); 16 let start_offset = nominal.syntax().range().end();