mirror of
https://github.com/floor-licker/polyfill-rs.git
synced 2026-08-05 00:37:44 +00:00
fix: use is_multiple_of method instead of manual modulo check to satisfy newer clippy lint requirements
This commit is contained in:
+1
-1
@@ -362,7 +362,7 @@ impl OrderBook {
|
||||
// }
|
||||
|
||||
// AFTER (fast, ~2ns, pure integer):
|
||||
if tick_size_ticks > 0 && delta.price % tick_size_ticks != 0 {
|
||||
if tick_size_ticks > 0 && !delta.price.is_multiple_of(tick_size_ticks) {
|
||||
// Price is not aligned to tick size - reject the update
|
||||
warn!(
|
||||
"Rejecting misaligned price: {} not divisible by tick size {}",
|
||||
|
||||
Reference in New Issue
Block a user