Skip to content

Commit

Permalink
Fix codes that fails dogfood
Browse files Browse the repository at this point in the history
  • Loading branch information
Y-Nak committed Feb 9, 2021
1 parent 4e23477 commit 7acb8f8
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 @@ -922,14 +922,14 @@ fn check_wild_err_arm(cx: &LateContext<'_>, ex: &Expr<'_>, arms: &[Arm<'_>]) {
let mut ident_bind_name = String::from("_");
if !matching_wild {
// Looking for unused bindings (i.e.: `_e`)
inner.iter().for_each(|pat| {
for pat in inner.iter() {
if let PatKind::Binding(_, id, ident, None) = pat.kind {
if ident.as_str().starts_with('_') && !LocalUsedVisitor::new(id).check_expr(arm.body) {
ident_bind_name = (&ident.name.as_str()).to_string();
matching_wild = true;
}
}
});
}
}
if_chain! {
if matching_wild;
Expand Down

0 comments on commit 7acb8f8

Please sign in to comment.