diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-02-06 16:50:01 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2020-02-06 16:50:01 +0000 |
commit | 895cdb588314f4e04529d1adf8cd232856497dad (patch) | |
tree | 6466cb45c30478eb0c413c25cc6d07cf23d39d3a /crates/ra_assists/src/assists/inline_local_variable.rs | |
parent | 8b957caf83b18b3fea153f770bfd0ed979227eff (diff) | |
parent | d1e8b8d134da802eecef5cbcd5486bd542ad75b5 (diff) |
Merge #3034
3034: Remove ImportLocator hack r=matklad a=matklad
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_assists/src/assists/inline_local_variable.rs')
-rw-r--r-- | crates/ra_assists/src/assists/inline_local_variable.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/crates/ra_assists/src/assists/inline_local_variable.rs b/crates/ra_assists/src/assists/inline_local_variable.rs index 83527d904..91b588243 100644 --- a/crates/ra_assists/src/assists/inline_local_variable.rs +++ b/crates/ra_assists/src/assists/inline_local_variable.rs | |||
@@ -1,4 +1,3 @@ | |||
1 | use hir::db::HirDatabase; | ||
2 | use ra_syntax::{ | 1 | use ra_syntax::{ |
3 | ast::{self, AstNode, AstToken}, | 2 | ast::{self, AstNode, AstToken}, |
4 | TextRange, | 3 | TextRange, |
@@ -23,7 +22,7 @@ use crate::{Assist, AssistCtx, AssistId}; | |||
23 | // (1 + 2) * 4; | 22 | // (1 + 2) * 4; |
24 | // } | 23 | // } |
25 | // ``` | 24 | // ``` |
26 | pub(crate) fn inline_local_variable(ctx: AssistCtx<impl HirDatabase>) -> Option<Assist> { | 25 | pub(crate) fn inline_local_variable(ctx: AssistCtx) -> Option<Assist> { |
27 | let let_stmt = ctx.find_node_at_offset::<ast::LetStmt>()?; | 26 | let let_stmt = ctx.find_node_at_offset::<ast::LetStmt>()?; |
28 | let bind_pat = match let_stmt.pat()? { | 27 | let bind_pat = match let_stmt.pat()? { |
29 | ast::Pat::BindPat(pat) => pat, | 28 | ast::Pat::BindPat(pat) => pat, |