manual-checked-division Prefer checked division over manual zero guards Guarding an unsigned division or remainder operation with a zero comparison manually implements checked division. Instead, you SHOULD use the corresponding checked method and handle its undefined result. - Category: style - Level: warning - Fix: none - Scope: module Reported function divide(value: uint32, divisor: uint32): uint32 | undefined { if (divisor != 0) { return value / divisor; } return undefined; } Accepted function divide(value: uint32, divisor: uint32): uint32 | undefined { return value.checkedDivide(divisor); } Prior art - Clippy ยท manualcheckedops language/linter/src/rules/style/manualcheckeddivision.rs:7