diff options
author | Aleksey Kladov <[email protected]> | 2019-07-20 10:58:27 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-07-20 10:58:27 +0100 |
commit | f3bdbec1b68fa0e20f0b7b6c6ef64e1507970b0d (patch) | |
tree | f2cb82f74d2d60d5351c3d7c4d8e7bce4d351cab /crates/ra_assists/src/inline_local_variable.rs | |
parent | 6d5d82e412dea19ea48eecc6f7d5a4aa223a9599 (diff) |
rename range -> text_range
Diffstat (limited to 'crates/ra_assists/src/inline_local_variable.rs')
-rw-r--r-- | crates/ra_assists/src/inline_local_variable.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/crates/ra_assists/src/inline_local_variable.rs b/crates/ra_assists/src/inline_local_variable.rs index 3c17089de..82c4d54b0 100644 --- a/crates/ra_assists/src/inline_local_variable.rs +++ b/crates/ra_assists/src/inline_local_variable.rs | |||
@@ -22,9 +22,12 @@ pub(crate) fn inline_local_varialbe(mut ctx: AssistCtx<impl HirDatabase>) -> Opt | |||
22 | .next_sibling_or_token() | 22 | .next_sibling_or_token() |
23 | .and_then(|it| ast::Whitespace::cast(it.as_token()?.clone())) | 23 | .and_then(|it| ast::Whitespace::cast(it.as_token()?.clone())) |
24 | { | 24 | { |
25 | TextRange::from_to(let_stmt.syntax().range().start(), whitespace.syntax().range().end()) | 25 | TextRange::from_to( |
26 | let_stmt.syntax().text_range().start(), | ||
27 | whitespace.syntax().text_range().end(), | ||
28 | ) | ||
26 | } else { | 29 | } else { |
27 | let_stmt.syntax().range() | 30 | let_stmt.syntax().text_range() |
28 | }; | 31 | }; |
29 | let analyzer = hir::SourceAnalyzer::new(ctx.db, ctx.frange.file_id, bind_pat.syntax(), None); | 32 | let analyzer = hir::SourceAnalyzer::new(ctx.db, ctx.frange.file_id, bind_pat.syntax(), None); |
30 | let refs = analyzer.find_all_refs(&bind_pat); | 33 | let refs = analyzer.find_all_refs(&bind_pat); |