prefer-unary-negation Prefer unary negation over multiplying or dividing by -1 Multiplying or dividing a builtin numeric value by negative one performs the same operation as unary negation. Instead, you SHOULD negate the value directly. - Category: style - Level: warning - Fix: automatic - Scope: module Reported function negate(value: int32): int32 { return value * -1; } Accepted function negate(value: int32): int32 { return -value; } Prior art - Clippy · negmultiply - eslint-plugin-unicorn · prefer-unary-minus language/linter/src/rules/style/preferunarynegation.rs:8