You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
integer_arithmetic rule is too simplistic and is triggered even when arithmetic operations are applied to constants/literals that cannot cause overflow or panic #6209
Hello, the following code triggers the integer-arithmetic rule:
warning: integer arithmetic detected
--> client/json-rpc/src/blocking/client.rs:89:44
|
89 | if expiration_time_secs <= state.timestamp_usecs / 1_000_000 {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: requested on the command line with `-W clippy::integer-arithmetic`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#integer_arithmetic
I'm not sure how useful it is, as there is no danger here IIUC. The only edge-case is division by 0 right?