We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
kind
1 parent 34abe4e commit adf38c0Copy full SHA for adf38c0
clippy_lints/src/unnested_or_patterns.rs
@@ -385,11 +385,11 @@ fn take_pat(from: &mut Pat) -> Pat {
385
/// in `tail_or` if there are any and return if there were.
386
fn extend_with_tail_or(target: &mut Pat, tail_or: ThinVec<Pat>) -> bool {
387
fn extend(target: &mut Pat, mut tail_or: ThinVec<Pat>) {
388
- match target {
+ match &mut target.kind {
389
// On an existing or-pattern in the target, append to it.
390
- Pat { kind: Or(ps), .. } => ps.append(&mut tail_or),
+ Or(ps) => ps.append(&mut tail_or),
391
// Otherwise convert the target to an or-pattern.
392
- target => {
+ _ => {
393
let mut init_or = thin_vec![take_pat(target)];
394
init_or.append(&mut tail_or);
395
target.kind = Or(init_or);
0 commit comments