Skip to content

Commit

Permalink
Auto merge of #11863 - smoelius:patch-1, r=dswij
Browse files Browse the repository at this point in the history
Nit re `matches!` formatting

I think formatting `matches!` with `if` guards is [still unsupported](rust-lang/rustfmt#5547), which is probably why this was missed.

changelog: none
  • Loading branch information
bors committed Nov 24, 2023
2 parents e075823 + 4937fba commit 3e7a63b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion clippy_lints/src/eta_reduction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,8 @@ fn check_inputs(
params.len() == self_arg.map_or(0, |_| 1) + args.len()
&& params.iter().zip(self_arg.into_iter().chain(args)).all(|(p, arg)| {
matches!(
p.pat.kind,PatKind::Binding(BindingAnnotation::NONE, id, _, None)
p.pat.kind,
PatKind::Binding(BindingAnnotation::NONE, id, _, None)
if path_to_local_id(arg, id)
)
// Only allow adjustments which change regions (i.e. re-borrowing).
Expand Down

0 comments on commit 3e7a63b

Please sign in to comment.