aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
authorgfreezy <[email protected]>2019-03-25 12:57:43 +0000
committergfreezy <[email protected]>2019-03-25 12:57:43 +0000
commit61315e4a891b29c76bdae58b7f1e74c88732c398 (patch)
tree0ad0b2a1783356cfefc92c3b7a1d868539a5d051 /crates
parentfd1585a071718ef9c9fb44f88336608dd7e624a5 (diff)
use | instead of multiple match arms
Diffstat (limited to 'crates')
-rw-r--r--crates/ra_assists/src/inline_local_variable.rs54
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) =