Skip to content

Commit

Permalink
Avoid wildcard match arm
Browse files Browse the repository at this point in the history
  • Loading branch information
fitzgen committed Nov 3, 2023
1 parent 38fdfb5 commit b5f0906
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion crates/wasmparser/src/readers/core/types/matches.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,17 +180,21 @@ impl<'a> Matches for WithRecGroup<&'a CompositeType> {
WithRecGroup::map(b, |_| fb),
offset,
),
(CompositeType::Func(_), _) => Ok(false),

(CompositeType::Array(aa), CompositeType::Array(ab)) => types.matches(
WithRecGroup::map(a, |_| *aa),
WithRecGroup::map(b, |_| *ab),
offset,
),
(CompositeType::Array(_), _) => Ok(false),

(CompositeType::Struct(sa), CompositeType::Struct(sb)) => types.matches(
WithRecGroup::map(a, |_| sa),
WithRecGroup::map(b, |_| sb),
offset,
),
_ => Ok(false),
(CompositeType::Struct(_), _) => Ok(false),
}
}
}
Expand Down

0 comments on commit b5f0906

Please sign in to comment.