Skip to content

Commit

Permalink
Change group and use only func call
Browse files Browse the repository at this point in the history
  • Loading branch information
ThibsG committed Dec 27, 2019
1 parent a183946 commit b0a4cae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions clippy_lints/src/matches.rs
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ declare_clippy_lint! {
/// }
/// ```
pub PATS_WITH_WILD_MATCH_ARM,
restriction,
complexity,
"a wildcard pattern used with others patterns in same match arm"
}

Expand Down Expand Up @@ -690,7 +690,7 @@ fn check_pats_wild_match(cx: &LateContext<'_, '_>, arms: &[Arm]) {
for arm in arms {
if let PatKind::Or(ref fields) = arm.pat.kind {
// look for multiple fields where one at least matches Wild pattern
if fields.len() > 1 && fields.into_iter().any(|pat| is_wild(pat)) {
if fields.len() > 1 && fields.into_iter().any(is_wild) {
span_lint_and_sugg(
cx,
PATS_WITH_WILD_MATCH_ARM,
Expand Down

0 comments on commit b0a4cae

Please sign in to comment.