Skip to content

Commit 0dccbed

Browse files
0xrinegadeclaude
andcommitted
fix(ovsm): suppress manual_is_multiple_of clippy lint
Adds allow attributes for the manual_is_multiple_of lint in OVSM median calculation. This lint suggests using .is_multiple_of() which is a nightly-only feature not available in stable Rust. ## Changes - Added #[allow(unknown_lints)] to suppress warning about unknown lint in older clippy - Added #[allow(clippy::manual_is_multiple_of)] for newer clippy versions - Preserves existing % 2 == 0 pattern which works on stable Rust ## Why Not Use .is_multiple_of()? The .is_multiple_of() method is currently unstable (nightly-only) and cannot be used in stable Rust builds. Once it stabilizes, we can remove these allow attributes and use the method. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent a66e8f2 commit 0dccbed

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

crates/ovsm/src/tools/stdlib/statistics.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@ impl Tool for MedianTool {
8282
.collect::<Result<Vec<_>>>()?;
8383
sorted.sort_by(|a, b| a.partial_cmp(b).unwrap());
8484

85+
#[allow(unknown_lints)]
86+
#[allow(clippy::manual_is_multiple_of)]
8587
let median = if sorted.len() % 2 == 0 {
8688
let mid = sorted.len() / 2;
8789
(sorted[mid - 1] + sorted[mid]) / 2.0

0 commit comments

Comments
 (0)