From e7d590c8a434ef7acaf5f11674614a1b4dc11fbc Mon Sep 17 00:00:00 2001 From: Dejan Port Date: Mon, 12 Oct 2026 02:07:45 +0200 Subject: [PATCH] style: satisfy cargo fmt and clippy on the fill-handle perf change cargo fmt reformatted the new example's while-loop condition onto its own line; clippy's nonminimal_bool caught a negated is_some_and that reads more plainly as is_none_or. Co-Authored-By: Claude Sonnet 5 --- crates/engine/examples/fill_handle_perf.rs | 3 ++- crates/model/src/store.rs | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/crates/engine/examples/fill_handle_perf.rs b/crates/engine/examples/fill_handle_perf.rs index ccdde36a3..0480c0afb 100644 --- a/crates/engine/examples/fill_handle_perf.rs +++ b/crates/engine/examples/fill_handle_perf.rs @@ -31,7 +31,8 @@ fn main() { let t = Instant::now(); let mut last = 0u32; let mut iters = 0u64; - while last + 1 < gridcraft_engine::core::MAX_ROWS && sh.value_ref(CellRef::new(last + 1, neighbour)).is_some_and(|v| !v.is_empty()) && last < cap { + while last + 1 < gridcraft_engine::core::MAX_ROWS && sh.value_ref(CellRef::new(last + 1, neighbour)).is_some_and(|v| !v.is_empty()) && last < cap + { last += 1; iters += 1; } diff --git a/crates/model/src/store.rs b/crates/model/src/store.rs index ec9b6c98c..658b898bf 100644 --- a/crates/model/src/store.rs +++ b/crates/model/src/store.rs @@ -149,7 +149,7 @@ impl CellStore { let band_hi = ((band_key + 1) * BAND - 1).min(cap); let mut advanced = false; for (r, cols) in band.rows.range(expect..=band_hi) { - if *r != expect || !cols.get(&from.col).is_some_and(|c| !c.value.is_empty()) { + if *r != expect || cols.get(&from.col).is_none_or(|c| c.value.is_empty()) { return last; } last = Some(expect);