Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir_ty/src/walk.rs')
-rw-r--r--crates/hir_ty/src/walk.rs7
1 files changed, 2 insertions, 5 deletions
diff --git a/crates/hir_ty/src/walk.rs b/crates/hir_ty/src/walk.rs
index 6ef1d53368..9cacc521d4 100644
--- a/crates/hir_ty/src/walk.rs
+++ b/crates/hir_ty/src/walk.rs
@@ -86,11 +86,8 @@ impl TypeWalk for AliasTy {
impl TypeWalk for GenericArg {
fn walk(&self, f: &mut impl FnMut(&Ty)) {
- match &self.interned() {
- GenericArgData::Ty(ty) => {
- ty.walk(f);
- }
- _ => {}
+ if let GenericArgData::Ty(ty) = &self.interned() {
+ ty.walk(f);
}
}
}