From d52ee59a712932bc381d8c690dc2f681598760fe Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sun, 21 Jul 2019 13:28:58 +0300 Subject: streamline API --- crates/ra_hir/src/ty/tests.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'crates/ra_hir') diff --git a/crates/ra_hir/src/ty/tests.rs b/crates/ra_hir/src/ty/tests.rs index 706500484..676711d0a 100644 --- a/crates/ra_hir/src/ty/tests.rs +++ b/crates/ra_hir/src/ty/tests.rs @@ -3211,8 +3211,7 @@ fn typing_whitespace_inside_a_function_should_not_invalidate_types() { ); { let file = db.parse(pos.file_id).ok().unwrap(); - let node = - algo::find_token_at_offset(file.syntax(), pos.offset).right_biased().unwrap().parent(); + let node = file.syntax().token_at_offset(pos.offset).right_biased().unwrap().parent(); let events = db.log_executed(|| { SourceAnalyzer::new(&db, pos.file_id, &node, None); }); @@ -3232,8 +3231,7 @@ fn typing_whitespace_inside_a_function_should_not_invalidate_types() { { let file = db.parse(pos.file_id).ok().unwrap(); - let node = - algo::find_token_at_offset(file.syntax(), pos.offset).right_biased().unwrap().parent(); + let node = file.syntax().token_at_offset(pos.offset).right_biased().unwrap().parent(); let events = db.log_executed(|| { SourceAnalyzer::new(&db, pos.file_id, &node, None); }); -- cgit v1.2.3