Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir_ty/src/lower.rs')
-rw-r--r--crates/hir_ty/src/lower.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/crates/hir_ty/src/lower.rs b/crates/hir_ty/src/lower.rs
index 3734eb1013..df1eb1c961 100644
--- a/crates/hir_ty/src/lower.rs
+++ b/crates/hir_ty/src/lower.rs
@@ -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,
}
}