Fix clippy errors that fail the effectcraft gate

Use iter::once for the single-range break fallback, and collapse a nested
if in the WGSL grammar test helper into a match guard. Behaviour is
unchanged.

Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
This commit is contained in:
Dylan M. Taylor
2026-10-26 09:19:43 -04:00
parent bbe793c467
commit eb242b59e4
2 changed files with 4 additions and 5 deletions
+3 -4
View File
@@ -176,11 +176,10 @@ fn violations(src: &str) -> Vec<(usize, String)> {
let tok = next_token(&s, &mut i);
match tok {
Tok::Open => levels.push(vec![]),
Tok::Close => {
if levels.len() > 1 {
levels.pop();
}
Tok::Close if levels.len() > 1 => {
levels.pop();
}
Tok::Close => {}
Tok::Sep => {
if let Some(l) = levels.last_mut() {
l.clear();