When checking lint errors with Rust v1.79.0 (cargo clippy), I have an "usage of a legacy numeric method" error with cargo clippy in src/uu/od/src/partialreader.rs (line 154).
$ cargo clippy --all-targets -puu_od -- -W clippy::manual_string_new -D warnings
(...)
Checking uucore v0.0.26 (/home/fox/dev/Perso/rust-coreutils.git/src/uucore)
Checking uu_od v0.0.26 (/home/fox/dev/Perso/rust-coreutils.git/src/uu/od)
error: usage of a legacy numeric method
--> src/uu/od/src/partialreader.rs:154:20
|
154 | usize::max_value() as u64,
| ^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
= note: `-D clippy::legacy-numeric-constants` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::legacy_numeric_constants)]`
help: use the associated constant instead
|
154 | usize::MAX as u64,
| ~~~
error: could not compile `uu_od` (lib test) due to 1 previous error
When checking lint errors with Rust v1.79.0 (
cargo clippy
), I have an "usage of a legacy numeric method" error withcargo clippy
insrc/uu/od/src/partialreader.rs
(line 154).This check for "legacy_numeric_constants" (see https://rust-lang.github.io/rust-clippy/master/index.html#/legacy_numeric_constants) was added in Rust version 1.79.0.