From 5c570fa77016f1a0dc96bde29b8cf44eab9fec17 Mon Sep 17 00:00:00 2001 From: Hirokazu Hata Date: Tue, 15 Jan 2019 09:26:20 +0900 Subject: Remove unneeded code --- crates/ra_hir/src/ty.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/ra_hir/src') diff --git a/crates/ra_hir/src/ty.rs b/crates/ra_hir/src/ty.rs index d3373644d..55373b05a 100644 --- a/crates/ra_hir/src/ty.rs +++ b/crates/ra_hir/src/ty.rs @@ -1107,13 +1107,13 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> { Ty::Tuple(Arc::from(ty_vec)) }, Expr::Array { exprs } => { - let mut elem_ty = match &expected.ty { + let elem_ty = match &expected.ty { Ty::Slice(inner) | Ty::Array(inner) => Ty::clone(&inner), _ => self.new_type_var(), }; for expr in exprs.iter() { - elem_ty = self.infer_expr(*expr, &Expectation::has_type(elem_ty.clone())); + self.infer_expr(*expr, &Expectation::has_type(elem_ty.clone())); } Ty::Array(Arc::new(elem_ty)) -- cgit v1.2.3