bench(cube-bench): use saturating_sub for expected-value arithmetic

clippy -D warnings flagged implicit_saturating_sub on the c1/c2/c3
expected-count calculations. Replace manual - with saturating_sub so
the lint gate stays clean at any scale.

Co-Authored-By: Hermes Agent (upstage/solar-pro4:free)
This commit is contained in:
CUBELinux-2
2026-08-20 19:03:48 -04:00
co-authored by Hermes Agent (upstage/solar-pro4:free)
parent ae1a62a44e
commit 3f007a1f38
+3 -3
View File
@@ -130,17 +130,17 @@ fn main() {
let expected_c1 = if scale_usize <= c1_start {
0
} else {
c2_start.min(scale_usize) - c1_start
c2_start.min(scale_usize).saturating_sub(c1_start)
};
let expected_c2 = if scale_usize <= c2_start {
0
} else {
c3_start.min(scale_usize) - c2_start
c3_start.min(scale_usize).saturating_sub(c2_start)
};
let expected_c3 = if scale_usize <= c3_start {
0
} else {
scale_usize - c3_start
scale_usize.saturating_sub(c3_start)
};
let got_c0 = store.scan_prefix(0, None, None).len();
let got_c1 = store.scan_prefix(1, None, None).len();