aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_assists/src/handlers/add_impl.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_assists/src/handlers/add_impl.rs')
-rw-r--r--crates/ra_assists/src/handlers/add_impl.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_assists/src/handlers/add_impl.rs b/crates/ra_assists/src/handlers/add_impl.rs
index 6622eadb2..d26f8b93d 100644
--- a/crates/ra_assists/src/handlers/add_impl.rs
+++ b/crates/ra_assists/src/handlers/add_impl.rs
@@ -1,6 +1,6 @@
1use ra_syntax::{ 1use ra_syntax::{
2 ast::{self, AstNode, NameOwner, TypeParamsOwner}, 2 ast::{self, AstNode, NameOwner, TypeParamsOwner},
3 TextUnit, 3 TextSize,
4}; 4};
5use stdx::{format_to, SepBy}; 5use stdx::{format_to, SepBy};
6 6
@@ -51,7 +51,7 @@ pub(crate) fn add_impl(ctx: AssistCtx) -> Option<Assist> {
51 format_to!(buf, "<{}>", generic_params) 51 format_to!(buf, "<{}>", generic_params)
52 } 52 }
53 buf.push_str(" {\n"); 53 buf.push_str(" {\n");
54 edit.set_cursor(start_offset + TextUnit::of_str(&buf)); 54 edit.set_cursor(start_offset + TextSize::of(&buf));
55 buf.push_str("\n}"); 55 buf.push_str("\n}");
56 edit.insert(start_offset, buf); 56 edit.insert(start_offset, buf);
57 }) 57 })