Comparison between unit-types detected, this will always be
true
325}
326
327pub fn positive_angle_with_x(start: MapPoint, end: MapPoint) -> f64 {
328 if {329 end.x;330 } == {331 start.x;332 } {333 return 90.;
334 }
335 let numer = (end.y as f64 - start.y as f64).abs();
Description
The unit value is always equal to itself. Comparisons against the unit value are probably the result of accidental semicolons.
Bad practice
if { foo(); } == { bar(); } {}
Recommended
let f = foo();
let b = bar();
if f == b {}