From 33add0ee30ed9deb715d15e07b16568d4deb56b3 Mon Sep 17 00:00:00 2001 From: Michael Killough Date: Sun, 17 Mar 2019 18:50:22 +0000 Subject: Simplify match statement. --- crates/ra_hir/src/ty/infer.rs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'crates/ra_hir/src') diff --git a/crates/ra_hir/src/ty/infer.rs b/crates/ra_hir/src/ty/infer.rs index 92c79df15..3d0b7a827 100644 --- a/crates/ra_hir/src/ty/infer.rs +++ b/crates/ra_hir/src/ty/infer.rs @@ -681,12 +681,7 @@ impl<'a, D: HirDatabase> InferenceContext<'a, D> { let inner_ty = self.insert_type_vars_shallow(inner_ty); let bound_ty = match mode { - BindingMode::Ref(Mutability::Shared) => { - Ty::Ref(inner_ty.clone().into(), Mutability::Shared) - } - BindingMode::Ref(Mutability::Mut) => { - Ty::Ref(inner_ty.clone().into(), Mutability::Mut) - } + BindingMode::Ref(mutability) => Ty::Ref(inner_ty.clone().into(), mutability), BindingMode::Move => inner_ty.clone(), }; let bound_ty = self.resolve_ty_as_possible(&mut vec![], bound_ty); -- cgit v1.2.3