I expected to see this happen: everything works fine. Clippy does need to not complain. Both inequality chains within the two if conditions are different from each other.
Instead, this happened:
this `if` has identical blocks
--> ghost\src\algorithms\intersection\segment_any.rs:119:74
|
119 | } else if c.x <= max_x && c.x >= min_x && c.y < max_y && c.y > min_y {
| __________________________________________________________________________^
120 | | PointSegResult::Inside
121 | | } else {
| |_____^
|
note: same as this
--> ghost\src\algorithms\intersection\segment_any.rs:117:74
|
117 | } else if c.x < max_x && c.x > min_x && c.y <= max_y && c.y >= min_y {
| __________________________________________________________________________^
118 | | PointSegResult::Inside
119 | | } else if c.x <= max_x && c.x >= min_x && c.y < max_y && c.y > min_y {
| |_____^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else
Meta
cargo clippy -V: e.g. clippy 0.0.212 (18bf6b4f0 2020-10-07)
I tried this code:
I expected to see this happen: everything works fine. Clippy does need to not complain. Both inequality chains within the two if conditions are different from each other.
Instead, this happened:
Meta
cargo clippy -V
: e.g. clippy 0.0.212 (18bf6b4f0 2020-10-07)rustc -Vv
:There is no need for a backtrace hence I omitted it.