aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src
diff options
context:
space:
mode:
authorMichael Killough <[email protected]>2019-03-17 18:50:22 +0000
committerMichael Killough <[email protected]>2019-03-17 18:50:22 +0000
commit33add0ee30ed9deb715d15e07b16568d4deb56b3 (patch)
treeaaeefde5b05c02ab9bec204fd5b36254c4253e1b /crates/ra_hir/src
parent354134ffb4e6a0962e9faf19ebe2bb1cda4da9ab (diff)
Simplify match statement.
Diffstat (limited to 'crates/ra_hir/src')
-rw-r--r--crates/ra_hir/src/ty/infer.rs7
1 files changed, 1 insertions, 6 deletions
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> {
681 let inner_ty = self.insert_type_vars_shallow(inner_ty); 681 let inner_ty = self.insert_type_vars_shallow(inner_ty);
682 682
683 let bound_ty = match mode { 683 let bound_ty = match mode {
684 BindingMode::Ref(Mutability::Shared) => { 684 BindingMode::Ref(mutability) => Ty::Ref(inner_ty.clone().into(), mutability),
685 Ty::Ref(inner_ty.clone().into(), Mutability::Shared)
686 }
687 BindingMode::Ref(Mutability::Mut) => {
688 Ty::Ref(inner_ty.clone().into(), Mutability::Mut)
689 }
690 BindingMode::Move => inner_ty.clone(), 685 BindingMode::Move => inner_ty.clone(),
691 }; 686 };
692 let bound_ty = self.resolve_ty_as_possible(&mut vec![], bound_ty); 687 let bound_ty = self.resolve_ty_as_possible(&mut vec![], bound_ty);