Simplify match statement.
This commit is contained in:
parent
354134ffb4
commit
33add0ee30
1 changed files with 1 additions and 6 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue