Replace if let with match where appropriate

This commit is contained in:
Aramis Razzaghipour 2021-10-03 23:53:01 +11:00
parent f29796da61
commit 9583dd5725
No known key found for this signature in database
GPG key ID: F788F7E990136003
44 changed files with 201 additions and 269 deletions

View file

@ -368,10 +368,9 @@ impl<'a> TyLoweringContext<'a> {
Some((it, None)) => it,
_ => return None,
};
if let TypeNs::GenericParam(param_id) = resolution {
Some(param_id)
} else {
None
match resolution {
TypeNs::GenericParam(param_id) => Some(param_id),
_ => None,
}
}