diff options
author | Aleksey Kladov <[email protected]> | 2020-05-21 13:34:27 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2020-05-21 14:08:03 +0100 |
commit | ff28c79ebd4c5a9a27542917940def9d4e66eea6 (patch) | |
tree | 5f7ad3596397e1f52473cdb81f2671d1baca2528 /crates/ra_assists | |
parent | 4b495da368162a5b373d078be4ff51e55bffdf69 (diff) |
Remove dead code for handling cursor positions
Diffstat (limited to 'crates/ra_assists')
-rw-r--r-- | crates/ra_assists/src/tests.rs | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/crates/ra_assists/src/tests.rs b/crates/ra_assists/src/tests.rs index 373a7f7cc..62dd3547f 100644 --- a/crates/ra_assists/src/tests.rs +++ b/crates/ra_assists/src/tests.rs | |||
@@ -7,8 +7,7 @@ use ra_db::{fixture::WithFixture, FileId, FileRange, SourceDatabaseExt}; | |||
7 | use ra_ide_db::{symbol_index::SymbolsDatabase, RootDatabase}; | 7 | use ra_ide_db::{symbol_index::SymbolsDatabase, RootDatabase}; |
8 | use ra_syntax::TextRange; | 8 | use ra_syntax::TextRange; |
9 | use test_utils::{ | 9 | use test_utils::{ |
10 | add_cursor, assert_eq_text, extract_offset, extract_range, extract_range_or_offset, | 10 | assert_eq_text, extract_offset, extract_range, extract_range_or_offset, RangeOrOffset, |
11 | RangeOrOffset, | ||
12 | }; | 11 | }; |
13 | 12 | ||
14 | use crate::{handlers::Handler, Assist, AssistConfig, AssistContext, Assists}; | 13 | use crate::{handlers::Handler, Assist, AssistConfig, AssistContext, Assists}; |
@@ -103,12 +102,6 @@ fn check(handler: Handler, before: &str, expected: ExpectedResult) { | |||
103 | 102 | ||
104 | let mut actual = db.file_text(change.file_id).as_ref().to_owned(); | 103 | let mut actual = db.file_text(change.file_id).as_ref().to_owned(); |
105 | change.edit.apply(&mut actual); | 104 | change.edit.apply(&mut actual); |
106 | |||
107 | if !source_change.is_snippet { | ||
108 | if let Some(off) = source_change.cursor_position { | ||
109 | actual = add_cursor(&actual, off.offset) | ||
110 | } | ||
111 | } | ||
112 | assert_eq_text!(after, &actual); | 105 | assert_eq_text!(after, &actual); |
113 | } | 106 | } |
114 | (Some(assist), ExpectedResult::Target(target)) => { | 107 | (Some(assist), ExpectedResult::Target(target)) => { |