diff options
author | Aleksey Kladov <[email protected]> | 2019-07-20 10:58:27 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-07-20 10:58:27 +0100 |
commit | f3bdbec1b68fa0e20f0b7b6c6ef64e1507970b0d (patch) | |
tree | f2cb82f74d2d60d5351c3d7c4d8e7bce4d351cab /crates/ra_assists/src/add_missing_impl_members.rs | |
parent | 6d5d82e412dea19ea48eecc6f7d5a4aa223a9599 (diff) |
rename range -> text_range
Diffstat (limited to 'crates/ra_assists/src/add_missing_impl_members.rs')
-rw-r--r-- | crates/ra_assists/src/add_missing_impl_members.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_assists/src/add_missing_impl_members.rs b/crates/ra_assists/src/add_missing_impl_members.rs index b992a4dc8..995e44d5e 100644 --- a/crates/ra_assists/src/add_missing_impl_members.rs +++ b/crates/ra_assists/src/add_missing_impl_members.rs | |||
@@ -43,7 +43,7 @@ fn add_missing_impl_members_inner( | |||
43 | 43 | ||
44 | let trait_def = { | 44 | let trait_def = { |
45 | let file_id = ctx.frange.file_id; | 45 | let file_id = ctx.frange.file_id; |
46 | let position = FilePosition { file_id, offset: impl_node.syntax().range().start() }; | 46 | let position = FilePosition { file_id, offset: impl_node.syntax().text_range().start() }; |
47 | let analyzer = hir::SourceAnalyzer::new(ctx.db, position.file_id, impl_node.syntax(), None); | 47 | let analyzer = hir::SourceAnalyzer::new(ctx.db, position.file_id, impl_node.syntax(), None); |
48 | 48 | ||
49 | resolve_target_trait_def(ctx.db, &analyzer, &impl_node)? | 49 | resolve_target_trait_def(ctx.db, &analyzer, &impl_node)? |
@@ -87,7 +87,7 @@ fn add_missing_impl_members_inner( | |||
87 | ast_editor.append_items(items); | 87 | ast_editor.append_items(items); |
88 | 88 | ||
89 | let first_new_item = ast_editor.ast().impl_items().nth(n_existing_items).unwrap(); | 89 | let first_new_item = ast_editor.ast().impl_items().nth(n_existing_items).unwrap(); |
90 | let cursor_position = first_new_item.syntax().range().start(); | 90 | let cursor_position = first_new_item.syntax().text_range().start(); |
91 | ast_editor.into_text_edit(edit.text_edit_builder()); | 91 | ast_editor.into_text_edit(edit.text_edit_builder()); |
92 | 92 | ||
93 | edit.set_cursor(cursor_position); | 93 | edit.set_cursor(cursor_position); |