mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 06:11:35 +00:00
Replace if let
with match
where appropriate
This commit is contained in:
parent
f29796da61
commit
9583dd5725
44 changed files with 201 additions and 269 deletions
|
@ -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(_, _)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue