From a6df224f7d3893f5a742b58818eac6c5a953721d Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Fri, 19 Jul 2019 18:25:07 +0300 Subject: minor --- crates/ra_hir/src/expr.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'crates') diff --git a/crates/ra_hir/src/expr.rs b/crates/ra_hir/src/expr.rs index 70af3f119..66cb9633b 100644 --- a/crates/ra_hir/src/expr.rs +++ b/crates/ra_hir/src/expr.rs @@ -564,11 +564,7 @@ where .else_branch() .map(|b| match b { ast::ElseBranch::Block(it) => self.collect_block(it), - ast::ElseBranch::IfExpr(elif) => { - let expr: ast::Expr = - ast::Expr::cast(elif.syntax().clone()).unwrap(); - self.collect_expr(expr) - } + ast::ElseBranch::IfExpr(elif) => self.collect_expr(elif.into()), }) .unwrap_or_else(|| self.empty_block()); let placeholder_pat = self.pats.alloc(Pat::Missing); -- cgit v1.2.3