tokio-rs / prost

PROST! a Protocol Buffers implementation for the Rust Language
Apache License 2.0
3.86k stars 500 forks source link

style: Remove use of legacy numeric constants #1089

Closed caspermeijn closed 2 months ago

caspermeijn commented 3 months ago

Cargo clippy reports:

warning: usage of a legacy numeric method
  --> prost/src/lib.rs:71:24
   |
71 |     if length > usize::max_value() as u64 {
   |                        ^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
help: use the associated constant instead
   |
71 |     if length > usize::MAX as u64 {
   |                        ~~~