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.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/crates/hir_ty/src/lower.rs b/crates/hir_ty/src/lower.rs index d5f3940149..af1d5fdb6a 100644 --- a/crates/hir_ty/src/lower.rs +++ b/crates/hir_ty/src/lower.rs @@ -369,10 +369,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, } } |