manual-midpoint Prefer midpoint operations that cannot overflow intermediate arithmetic Dividing the sum of two numeric values computes the sum before reducing it and may overflow. Instead, you SHOULD call .midpoint() on one operand. Floating-point midpoint rounding can differ from the expanded arithmetic. - Category: correctness - Level: warning - Fix: suggestion - Scope: module Reported function middle(left: uint32, right: uint32): uint32 { return (left + right) / 2; } Accepted function middle(left: uint32, right: uint32): uint32 { return left.midpoint(right); } Prior art - Clippy ยท manualmidpoint language/linter/src/rules/correctness/manualmidpoint.rs:8