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
warning: `if` chain can be rewritten with `match`
--> vm/src/stdlib/math.rs:327:9
|
327 | / if modulus < c {
328 | | r = modulus;
329 | | } else if modulus > c {
330 | | r = -c;
331 | | } else {
332 | | r = modulus - 2.0 * fmod(0.5 * (absx - modulus), absy);
333 | | }
| |_________^
|
= note: `#[warn(clippy::comparison_chain)]` on by default
= help: Consider rewriting the `if` chain to use `cmp` and `match`.
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_chain
The link in help is not helpful for f64. So I guess this is a false positive or lack of help document
The text was updated successfully, but these errors were encountered:
I can't reproduce this error. The lint checks that the type implements Ord so this shouldn't be happening. Can you provide an example on the rust playground?
The below happens when
modulus
is a f64 vairalbe.The link in help is not helpful for f64. So I guess this is a false positive or lack of help document
The text was updated successfully, but these errors were encountered: