mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-15 09:27:25 +00:00
Fix codes that fails dogfood
This commit is contained in:
parent
5029dc805f
commit
30952530c5
1 changed files with 2 additions and 2 deletions
|
@ -924,7 +924,7 @@ fn check_wild_err_arm<'tcx>(cx: &LateContext<'tcx>, ex: &Expr<'tcx>, 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(cx, id).check_expr(arm.body)
|
||||
|
@ -933,7 +933,7 @@ fn check_wild_err_arm<'tcx>(cx: &LateContext<'tcx>, ex: &Expr<'tcx>, arms: &[Arm
|
|||
matching_wild = true;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
if_chain! {
|
||||
if matching_wild;
|
||||
|
|
Loading…
Reference in a new issue