Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir_ty/src/method_resolution.rs')
| -rw-r--r-- | crates/hir_ty/src/method_resolution.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/crates/hir_ty/src/method_resolution.rs b/crates/hir_ty/src/method_resolution.rs index c88a8b6535..8e6ab8af0f 100644 --- a/crates/hir_ty/src/method_resolution.rs +++ b/crates/hir_ty/src/method_resolution.rs @@ -82,10 +82,9 @@ impl TyFingerprint { TyKind::Ref(_, _, ty) => return TyFingerprint::for_trait_impl(ty), TyKind::Tuple(_, subst) => { let first_ty = subst.interned().get(0).map(|arg| arg.assert_ty_ref(&Interner)); - if let Some(ty) = first_ty { - return TyFingerprint::for_trait_impl(ty); - } else { - TyFingerprint::Unit + match first_ty { + Some(ty) => return TyFingerprint::for_trait_impl(ty), + None => TyFingerprint::Unit, } } TyKind::AssociatedType(_, _) |