diff options
author | Aleksey Kladov <[email protected]> | 2019-11-15 22:14:56 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-11-15 22:14:56 +0000 |
commit | f36ac059f362050dae36569940b94a331387294a (patch) | |
tree | 895770caf6ae51bf9fad7766924212ff5f326758 /crates/ra_assists/src/assists/inline_local_variable.rs | |
parent | 892671926bcb5fd9cd5df6fd2b8c7efb5f25582d (diff) |
Reduce some duplication
Diffstat (limited to 'crates/ra_assists/src/assists/inline_local_variable.rs')
-rw-r--r-- | crates/ra_assists/src/assists/inline_local_variable.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ra_assists/src/assists/inline_local_variable.rs b/crates/ra_assists/src/assists/inline_local_variable.rs index a7fd9b6d2..18a34502c 100644 --- a/crates/ra_assists/src/assists/inline_local_variable.rs +++ b/crates/ra_assists/src/assists/inline_local_variable.rs | |||
@@ -45,7 +45,7 @@ pub(crate) fn inline_local_varialbe(ctx: AssistCtx<impl HirDatabase>) -> Option< | |||
45 | } else { | 45 | } else { |
46 | let_stmt.syntax().text_range() | 46 | let_stmt.syntax().text_range() |
47 | }; | 47 | }; |
48 | let analyzer = hir::SourceAnalyzer::new(ctx.db, ctx.frange.file_id, bind_pat.syntax(), None); | 48 | let analyzer = ctx.source_analyzer(bind_pat.syntax(), None); |
49 | let refs = analyzer.find_all_refs(&bind_pat); | 49 | let refs = analyzer.find_all_refs(&bind_pat); |
50 | 50 | ||
51 | let mut wrap_in_parens = vec![true; refs.len()]; | 51 | let mut wrap_in_parens = vec![true; refs.len()]; |