aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_api/src/extend_selection.rs
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-05-28 16:46:11 +0100
committerAleksey Kladov <[email protected]>2019-05-28 16:46:11 +0100
commit61e1474ab35deb7d54cc2f5d710b901f200b6467 (patch)
tree158afa2f165a70fdcb5870c940cc9653854e59fa /crates/ra_ide_api/src/extend_selection.rs
parentc8bcfe6a05d82e151d459bcd2bd8a7b2742f7a66 (diff)
fix typos in mbe tests
Diffstat (limited to 'crates/ra_ide_api/src/extend_selection.rs')
-rw-r--r--crates/ra_ide_api/src/extend_selection.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_ide_api/src/extend_selection.rs b/crates/ra_ide_api/src/extend_selection.rs
index 4553faad0..00c445310 100644
--- a/crates/ra_ide_api/src/extend_selection.rs
+++ b/crates/ra_ide_api/src/extend_selection.rs
@@ -11,7 +11,7 @@ use crate::{FileRange, db::RootDatabase};
11 11
12// FIXME: restore macro support 12// FIXME: restore macro support
13pub(crate) fn extend_selection(db: &RootDatabase, frange: FileRange) -> TextRange { 13pub(crate) fn extend_selection(db: &RootDatabase, frange: FileRange) -> TextRange {
14 let source_file = db.parse(frange.file_id); 14 let source_file = db.parse(frange.file_id).tree;
15 try_extend_selection(source_file.syntax(), frange.range).unwrap_or(frange.range) 15 try_extend_selection(source_file.syntax(), frange.range).unwrap_or(frange.range)
16} 16}
17 17
@@ -212,7 +212,7 @@ mod tests {
212 212
213 fn do_check(before: &str, afters: &[&str]) { 213 fn do_check(before: &str, afters: &[&str]) {
214 let (cursor, before) = extract_offset(before); 214 let (cursor, before) = extract_offset(before);
215 let file = SourceFile::parse(&before); 215 let file = SourceFile::parse(&before).tree;
216 let mut range = TextRange::offset_len(cursor, 0.into()); 216 let mut range = TextRange::offset_len(cursor, 0.into());
217 for &after in afters { 217 for &after in afters {
218 range = try_extend_selection(file.syntax(), range).unwrap(); 218 range = try_extend_selection(file.syntax(), range).unwrap();