diff options
Diffstat (limited to 'crates')
| -rw-r--r-- | crates/ra_assists/src/inline_local_variable.rs | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/crates/ra_assists/src/inline_local_variable.rs b/crates/ra_assists/src/inline_local_variable.rs index ce0aafb27..bd3cdb970 100644 --- a/crates/ra_assists/src/inline_local_variable.rs +++ b/crates/ra_assists/src/inline_local_variable.rs | |||
| @@ -17,33 +17,33 @@ pub(crate) fn inline_local_varialbe(mut ctx: AssistCtx<impl HirDatabase>) -> Opt | |||
| 17 | } | 17 | } |
| 18 | let initializer = let_stmt.initializer()?; | 18 | let initializer = let_stmt.initializer()?; |
| 19 | let wrap_in_parens = match initializer.kind() { | 19 | let wrap_in_parens = match initializer.kind() { |
| 20 | ExprKind::LambdaExpr(_) => true, | 20 | ExprKind::LambdaExpr(_) |
| 21 | ExprKind::IfExpr(_) => true, | 21 | | ExprKind::IfExpr(_) |
| 22 | ExprKind::LoopExpr(_) => true, | 22 | | ExprKind::LoopExpr(_) |
| 23 | ExprKind::ForExpr(_) => true, | 23 | | ExprKind::ForExpr(_) |
| 24 | ExprKind::WhileExpr(_) => true, | 24 | | ExprKind::WhileExpr(_) |
| 25 | ExprKind::ContinueExpr(_) => true, | 25 | | ExprKind::ContinueExpr(_) |
| 26 | ExprKind::BreakExpr(_) => true, | 26 | | ExprKind::BreakExpr(_) |
| 27 | ExprKind::Label(_) => true, | 27 | | ExprKind::Label(_) |
| 28 | ExprKind::ReturnExpr(_) => true, | 28 | | ExprKind::ReturnExpr(_) |
| 29 | ExprKind::MatchExpr(_) => true, | 29 | | ExprKind::MatchExpr(_) |
| 30 | ExprKind::StructLit(_) => true, | 30 | | ExprKind::StructLit(_) |
| 31 | ExprKind::CastExpr(_) => true, | 31 | | ExprKind::CastExpr(_) |
| 32 | ExprKind::PrefixExpr(_) => true, | 32 | | ExprKind::PrefixExpr(_) |
| 33 | ExprKind::RangeExpr(_) => true, | 33 | | ExprKind::RangeExpr(_) |
| 34 | ExprKind::BinExpr(_) => true, | 34 | | ExprKind::BinExpr(_) => true, |
| 35 | ExprKind::CallExpr(_) => false, | 35 | ExprKind::CallExpr(_) |
| 36 | ExprKind::IndexExpr(_) => false, | 36 | | ExprKind::IndexExpr(_) |
| 37 | ExprKind::MethodCallExpr(_) => false, | 37 | | ExprKind::MethodCallExpr(_) |
| 38 | ExprKind::FieldExpr(_) => false, | 38 | | ExprKind::FieldExpr(_) |
| 39 | ExprKind::TryExpr(_) => false, | 39 | | ExprKind::TryExpr(_) |
| 40 | ExprKind::RefExpr(_) => false, | 40 | | ExprKind::RefExpr(_) |
| 41 | ExprKind::Literal(_) => false, | 41 | | ExprKind::Literal(_) |
| 42 | ExprKind::TupleExpr(_) => false, | 42 | | ExprKind::TupleExpr(_) |
| 43 | ExprKind::ArrayExpr(_) => false, | 43 | | ExprKind::ArrayExpr(_) |
| 44 | ExprKind::ParenExpr(_) => false, | 44 | | ExprKind::ParenExpr(_) |
| 45 | ExprKind::PathExpr(_) => false, | 45 | | ExprKind::PathExpr(_) |
| 46 | ExprKind::BlockExpr(_) => false, | 46 | | ExprKind::BlockExpr(_) => false, |
| 47 | }; | 47 | }; |
| 48 | 48 | ||
| 49 | let delete_range = if let Some(whitespace) = | 49 | let delete_range = if let Some(whitespace) = |
