aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_assists/src/handlers/add_function.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_assists/src/handlers/add_function.rs')
-rw-r--r--crates/ra_assists/src/handlers/add_function.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/ra_assists/src/handlers/add_function.rs b/crates/ra_assists/src/handlers/add_function.rs
index f185cffdb..7a8f5705f 100644
--- a/crates/ra_assists/src/handlers/add_function.rs
+++ b/crates/ra_assists/src/handlers/add_function.rs
@@ -1,6 +1,6 @@
1use ra_syntax::{ 1use ra_syntax::{
2 ast::{self, AstNode}, 2 ast::{self, AstNode},
3 SyntaxKind, SyntaxNode, TextUnit, 3 SyntaxKind, SyntaxNode, TextSize,
4}; 4};
5 5
6use crate::{Assist, AssistCtx, AssistFile, AssistId}; 6use crate::{Assist, AssistCtx, AssistFile, AssistId};
@@ -69,8 +69,8 @@ pub(crate) fn add_function(ctx: AssistCtx) -> Option<Assist> {
69} 69}
70 70
71struct FunctionTemplate { 71struct FunctionTemplate {
72 insert_offset: TextUnit, 72 insert_offset: TextSize,
73 cursor_offset: TextUnit, 73 cursor_offset: TextSize,
74 fn_def: ast::SourceFile, 74 fn_def: ast::SourceFile,
75 file: AssistFile, 75 file: AssistFile,
76} 76}
@@ -129,7 +129,7 @@ impl FunctionBuilder {
129 let fn_def = indent_once.increase_indent(fn_def); 129 let fn_def = indent_once.increase_indent(fn_def);
130 let fn_def = ast::make::add_trailing_newlines(1, fn_def); 130 let fn_def = ast::make::add_trailing_newlines(1, fn_def);
131 let fn_def = indent.increase_indent(fn_def); 131 let fn_def = indent.increase_indent(fn_def);
132 (fn_def, it.syntax().text_range().start() + TextUnit::from_usize(1)) 132 (fn_def, it.syntax().text_range().start() + TextSize::from_usize(1))
133 } 133 }
134 }; 134 };
135 135