Skip to content

Commit ca89a06

Browse files
committed
fix(contract): clippy erasing_op in M1 test — drop the vacuous high-bit assertion (CI #439)
clippy::erasing_op on recipe_kernels.rs:1074: `m.0 & !0xFF` where m.0:u8 is always 0 (a u8 can't hold bits above 0xFF). The 'no stray high bits' guard was meaningless on a u8; the real invariant (len() <= 8) is already asserted. Removed the tautological line. https://claude.ai/code/session_01R9AWgFa65uPnLyS2my2d2R
1 parent f9927ce commit ca89a06

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

crates/lance-graph-contract/src/recipe_kernels.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1069,10 +1069,10 @@ mod tests {
10691069
distinct.len()
10701070
);
10711071

1072-
// Every non-empty mask is within the 8-field basis (no stray high bits).
1072+
// Every mask is within the 8-field basis. (`u8` is structurally 8 bits, so
1073+
// the bound is on the populated-field count, not stray high bits.)
10731074
for m in &masks {
1074-
assert_eq!(m.0 & !0xFF, 0);
1075-
assert!(m.len() <= 8);
1075+
assert!(m.len() <= 8, "mask exceeds the 8-field ThoughtField basis");
10761076
}
10771077
}
10781078

0 commit comments

Comments
 (0)