From cc6ba84c400417af873462364ba5cd4f6b5ab1f6 Mon Sep 17 00:00:00 2001 From: robojumper Date: Sun, 31 May 2020 12:06:22 +0200 Subject: [PATCH] fmt --- crates/ra_hir_def/src/body/lower.rs | 30 +++++++++++++++++++---------- crates/ra_hir_def/src/expr.rs | 2 +- 2 files changed, 21 insertions(+), 11 deletions(-) diff --git a/crates/ra_hir_def/src/body/lower.rs b/crates/ra_hir_def/src/body/lower.rs index dc52c6bd96..f159f80af0 100644 --- a/crates/ra_hir_def/src/body/lower.rs +++ b/crates/ra_hir_def/src/body/lower.rs @@ -218,7 +218,10 @@ impl ExprCollector<'_> { self.alloc_expr( Expr::Loop { body, - label: e.label().and_then(|l| l.lifetime_token()).map(|l| Name::new_lifetime(&l)), + label: e + .label() + .and_then(|l| l.lifetime_token()) + .map(|l| Name::new_lifetime(&l)), }, syntax_ptr, ) @@ -247,7 +250,10 @@ impl ExprCollector<'_> { return self.alloc_expr( Expr::Loop { body: match_expr, - label: e.label().and_then(|l| l.lifetime_token()).map(|l| Name::new_lifetime(&l)), + label: e + .label() + .and_then(|l| l.lifetime_token()) + .map(|l| Name::new_lifetime(&l)), }, syntax_ptr, ); @@ -259,7 +265,10 @@ impl ExprCollector<'_> { Expr::While { condition, body, - label: e.label().and_then(|l| l.lifetime_token()).map(|l| Name::new_lifetime(&l)), + label: e + .label() + .and_then(|l| l.lifetime_token()) + .map(|l| Name::new_lifetime(&l)), }, syntax_ptr, ) @@ -273,7 +282,10 @@ impl ExprCollector<'_> { iterable, pat, body, - label: e.label().and_then(|l| l.lifetime_token()).map(|l| Name::new_lifetime(&l)), + label: e + .label() + .and_then(|l| l.lifetime_token()) + .map(|l| Name::new_lifetime(&l)), }, syntax_ptr, ) @@ -329,12 +341,10 @@ impl ExprCollector<'_> { .unwrap_or(Expr::Missing); self.alloc_expr(path, syntax_ptr) } - ast::Expr::ContinueExpr(e) => { - self.alloc_expr( - Expr::Continue { label: e.lifetime_token().map(|l| Name::new_lifetime(&l)) }, - syntax_ptr, - ) - } + ast::Expr::ContinueExpr(e) => self.alloc_expr( + Expr::Continue { label: e.lifetime_token().map(|l| Name::new_lifetime(&l)) }, + syntax_ptr, + ), ast::Expr::BreakExpr(e) => { let expr = e.expr().map(|e| self.collect_expr(e)); self.alloc_expr( diff --git a/crates/ra_hir_def/src/expr.rs b/crates/ra_hir_def/src/expr.rs index 8683f6c7f6..ca49b26d15 100644 --- a/crates/ra_hir_def/src/expr.rs +++ b/crates/ra_hir_def/src/expr.rs @@ -275,7 +275,7 @@ impl Expr { f(arm.expr); } } - Expr::Continue { .. } => {}, + Expr::Continue { .. } => {} Expr::Break { expr, .. } | Expr::Return { expr } => { if let Some(expr) = expr { f(*expr);