Skip to content

Commit 208741a

Browse files
committed
style: cargo fmt + clippy --fix under stable 1.96 (CI toolchain) — fmt --check + clippy -D warnings clean
1 parent c8ade88 commit 208741a

2 files changed

Lines changed: 7 additions & 11 deletions

File tree

src/codegen/parser.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,8 @@ pub fn parse_single_kernel(raw: &RawKernelConfig) -> Result<KernelConfig> {
5050
);
5151
}
5252
}
53-
SOAC::Histogram => {
54-
if raw.bins.is_none() || raw.bins == Some(0) {
55-
bail!("Kernel '{}': histogram pattern requires bins > 0", raw.name);
56-
}
53+
SOAC::Histogram if (raw.bins.is_none() || raw.bins == Some(0)) => {
54+
bail!("Kernel '{}': histogram pattern requires bins > 0", raw.name);
5755
}
5856
_ => {}
5957
}

src/manifest/mod.rs

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -186,13 +186,11 @@ fn validate_kernel(
186186
);
187187
}
188188
}
189-
SOAC::Histogram => {
190-
if kernel.bins.is_none() || kernel.bins == Some(0) {
191-
bail!(
192-
"{}: 'histogram' pattern requires a 'bins' field with a positive integer",
193-
ctx
194-
);
195-
}
189+
SOAC::Histogram if (kernel.bins.is_none() || kernel.bins == Some(0)) => {
190+
bail!(
191+
"{}: 'histogram' pattern requires a 'bins' field with a positive integer",
192+
ctx
193+
);
196194
}
197195
_ => {}
198196
}

0 commit comments

Comments
 (0)