From ff28c79ebd4c5a9a27542917940def9d4e66eea6 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 21 May 2020 14:34:27 +0200 Subject: Remove dead code for handling cursor positions --- crates/ra_assists/src/tests.rs | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'crates/ra_assists/src') 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}; use ra_ide_db::{symbol_index::SymbolsDatabase, RootDatabase}; use ra_syntax::TextRange; use test_utils::{ - add_cursor, assert_eq_text, extract_offset, extract_range, extract_range_or_offset, - RangeOrOffset, + assert_eq_text, extract_offset, extract_range, extract_range_or_offset, RangeOrOffset, }; use crate::{handlers::Handler, Assist, AssistConfig, AssistContext, Assists}; @@ -103,12 +102,6 @@ fn check(handler: Handler, before: &str, expected: ExpectedResult) { let mut actual = db.file_text(change.file_id).as_ref().to_owned(); change.edit.apply(&mut actual); - - if !source_change.is_snippet { - if let Some(off) = source_change.cursor_position { - actual = add_cursor(&actual, off.offset) - } - } assert_eq_text!(after, &actual); } (Some(assist), ExpectedResult::Target(target)) => { -- cgit v1.2.3