aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_assists/src/introduce_variable.rs
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-02-08 11:49:43 +0000
committerAleksey Kladov <[email protected]>2019-02-08 11:49:43 +0000
commit12e3b4c70b5ef23b2fdfc197296d483680e125f9 (patch)
tree71baa0e0a62f9f6b61450501c5f821f67badf9e4 /crates/ra_assists/src/introduce_variable.rs
parent5cb1d41a30d25cbe136402644bf5434dd667f1e5 (diff)
reformat the world
Diffstat (limited to 'crates/ra_assists/src/introduce_variable.rs')
-rw-r--r--crates/ra_assists/src/introduce_variable.rs6
1 files changed, 1 insertions, 5 deletions
diff --git a/crates/ra_assists/src/introduce_variable.rs b/crates/ra_assists/src/introduce_variable.rs
index f587b4fe6..4f7c9f3c2 100644
--- a/crates/ra_assists/src/introduce_variable.rs
+++ b/crates/ra_assists/src/introduce_variable.rs
@@ -81,11 +81,7 @@ fn anchor_stmt(expr: &ast::Expr) -> Option<(&SyntaxNode, bool)> {
81 return Some((node, false)); 81 return Some((node, false));
82 } 82 }
83 83
84 if let Some(expr) = node 84 if let Some(expr) = node.parent().and_then(ast::Block::cast).and_then(|it| it.expr()) {
85 .parent()
86 .and_then(ast::Block::cast)
87 .and_then(|it| it.expr())
88 {
89 if expr.syntax() == node { 85 if expr.syntax() == node {
90 return Some((node, false)); 86 return Some((node, false));
91 } 87 }