Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Resolve unnecessary_cast clippy lint
error: casting to the same type is unnecessary (`u32` -> `u32`) --> src/pretty/mantissa.rs:46:17 | 46 | let c = (output - 10_000 * (output / 10_000)) as u32; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(output - 10_000 * (output / 10_000))` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast = note: `-D clippy::unnecessary-cast` implied by `-D clippy::all` error: casting to the same type is unnecessary (`u32` -> `u32`) --> src/pretty/mantissa.rs:63:17 | 63 | let c = ((output % 100) << 1) as u32; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `((output % 100) << 1)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast error: casting to the same type is unnecessary (`u32` -> `u32`) --> src/pretty/mantissa.rs:73:17 | 73 | let c = (output << 1) as u32; | ^^^^^^^^^^^^^^^^^^^^ help: try: `(output << 1)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast error: casting to the same type is unnecessary (`u32` -> `u32`) --> src/pretty/mod.rs:164:9 | 164 | ((bits >> FLOAT_MANTISSA_BITS) & ((1u32 << FLOAT_EXPONENT_BITS) - 1)) as u32; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `((bits >> FLOAT_MANTISSA_BITS) & ((1u32 << FLOAT_EXPONENT_BITS) - 1))` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast error: casting to the same type is unnecessary (`u32` -> `u32`) --> src/s2f.rs:223:68 | 223 | let ieee = ((((signed_m as u32) << f2s::FLOAT_EXPONENT_BITS) | ieee_e2 as u32) | ^^^^^^^^^^^^^^ help: try: `ieee_e2` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast = note: `-D clippy::unnecessary-cast` implied by `-D clippy::all`
- Loading branch information