manual-euclidean-remainder Prefer remainderEuclidean over its manual double-remainder form Applying remainder twice around an added positive divisor manually normalizes a negative remainder. Instead, you SHOULD call .remainderEuclidean() on the dividend. - Category: style - Level: warning - Fix: automatic - Scope: module Reported function wrap(value: int32): int32 { return ((value % 4) + 4) % 4; } Accepted function wrap(value: int32): int32 { return value.remainderEuclidean(4); } Prior art - Clippy ยท manualremeuclid language/linter/src/rules/style/manualeuclideanremainder.rs:8