diff options
Diffstat (limited to 'crates/ra_assists/src/introduce_variable.rs')
-rw-r--r-- | crates/ra_assists/src/introduce_variable.rs | 6 |
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 | } |