From 434f108adad75b7c5e25db745a9f9fefa5cdaa31 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sun, 24 Nov 2019 18:48:29 +0300 Subject: Simplify --- crates/ra_hir/src/expr.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'crates/ra_hir/src/expr.rs') diff --git a/crates/ra_hir/src/expr.rs b/crates/ra_hir/src/expr.rs index 6b703d8b4..43fedde7a 100644 --- a/crates/ra_hir/src/expr.rs +++ b/crates/ra_hir/src/expr.rs @@ -44,15 +44,15 @@ impl<'a, 'b> ExprValidator<'a, 'b> { pub(crate) fn validate_body(&mut self, db: &impl HirDatabase) { let body = self.func.body(db); - for e in body.exprs() { + for e in body.exprs.iter() { if let (id, Expr::RecordLit { path, fields, spread }) = e { self.validate_record_literal(id, path, fields, *spread, db); } } - let body_expr = &body[body.body_expr()]; + let body_expr = &body[body.body_expr]; if let Expr::Block { statements: _, tail: Some(t) } = body_expr { - self.validate_results_in_tail_expr(body.body_expr(), *t, db); + self.validate_results_in_tail_expr(body.body_expr, *t, db); } } -- cgit v1.2.3