Skip to content

Commit a1c07fd

Browse files
authored
Merge pull request rust-lang#21760 from Shourya742/2026-03-06-fix-clippy
Fix clippy on master
2 parents 2a8f00f + c45f416 commit a1c07fd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

xtask/src/codegen/grammar/ast_src.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,9 +189,9 @@ pub(crate) fn generate_kind_src(
189189
}
190190
}
191191
});
192-
PUNCT.iter().zip(used_puncts).filter(|(_, used)| !used).for_each(|((punct, _), _)| {
192+
if let Some(punct) = PUNCT.iter().zip(used_puncts).find(|(_, used)| !used) {
193193
panic!("Punctuation {punct:?} is not used in grammar");
194-
});
194+
}
195195
keywords.extend(RESERVED.iter().copied());
196196
keywords.sort();
197197
keywords.dedup();

0 commit comments

Comments
 (0)