15 lines
363 B
Text
15 lines
363 B
Text
|
error: This looks like you've implemented your own absolute value function
|
||
|
--> $DIR/floating_point_abs.rs:4:5
|
||
|
|
|
||
|
LL | / if num >= 0.0 {
|
||
|
LL | | num
|
||
|
LL | | } else {
|
||
|
LL | | -num
|
||
|
LL | | }
|
||
|
| |_____^ help: try: `num.abs()`
|
||
|
|
|
||
|
= note: `-D clippy::suboptimal-flops` implied by `-D warnings`
|
||
|
|
||
|
error: aborting due to previous error
|
||
|
|