diff options
author | Aleksey Kladov <[email protected]> | 2019-07-21 11:28:58 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-07-21 11:28:58 +0100 |
commit | d52ee59a712932bc381d8c690dc2f681598760fe (patch) | |
tree | f1fd1615203dd5552172cc35e0b6c5c9b76104c2 /crates/ra_hir/src/ty | |
parent | 62be91b82d6368a20a40893b199bc4f7a35a2223 (diff) |
streamline API
Diffstat (limited to 'crates/ra_hir/src/ty')
-rw-r--r-- | crates/ra_hir/src/ty/tests.rs | 6 |
1 files changed, 2 insertions, 4 deletions
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() { | |||
3211 | ); | 3211 | ); |
3212 | { | 3212 | { |
3213 | let file = db.parse(pos.file_id).ok().unwrap(); | 3213 | let file = db.parse(pos.file_id).ok().unwrap(); |
3214 | let node = | 3214 | let node = file.syntax().token_at_offset(pos.offset).right_biased().unwrap().parent(); |
3215 | algo::find_token_at_offset(file.syntax(), pos.offset).right_biased().unwrap().parent(); | ||
3216 | let events = db.log_executed(|| { | 3215 | let events = db.log_executed(|| { |
3217 | SourceAnalyzer::new(&db, pos.file_id, &node, None); | 3216 | SourceAnalyzer::new(&db, pos.file_id, &node, None); |
3218 | }); | 3217 | }); |
@@ -3232,8 +3231,7 @@ fn typing_whitespace_inside_a_function_should_not_invalidate_types() { | |||
3232 | 3231 | ||
3233 | { | 3232 | { |
3234 | let file = db.parse(pos.file_id).ok().unwrap(); | 3233 | let file = db.parse(pos.file_id).ok().unwrap(); |
3235 | let node = | 3234 | let node = file.syntax().token_at_offset(pos.offset).right_biased().unwrap().parent(); |
3236 | algo::find_token_at_offset(file.syntax(), pos.offset).right_biased().unwrap().parent(); | ||
3237 | let events = db.log_executed(|| { | 3235 | let events = db.log_executed(|| { |
3238 | SourceAnalyzer::new(&db, pos.file_id, &node, None); | 3236 | SourceAnalyzer::new(&db, pos.file_id, &node, None); |
3239 | }); | 3237 | }); |