use parity_scale_codec::{Encode, Decode};
#[derive(Encode, Decode)]
pub enum Test {
One,
Two
}
error: trivial numeric cast: `usize` as `usize`
--> src/lib.rs:5:5
|
5 | One,
| ^^^
|
= help: cast can be replaced by coercion; this might require a temporary variable
= note: requested on the command line with `-D trivial-numeric-casts`
error: trivial numeric cast: `usize` as `usize`
--> src/lib.rs:6:5
|
6 | Two
| ^^^
|
= help: cast can be replaced by coercion; this might require a temporary variable
error: trivial numeric cast: `usize` as `usize`
--> src/lib.rs:5:5
|
5 | One,
| ^^^
|
= help: cast can be replaced by coercion; this might require a temporary variable
error: could not compile `parity-scale-trivial-num-casts-issue` (lib) due to 4 previous errors
Versions:
parity-scale-codec: 3.7.5This code:
Produces these errors:
Full reproduction: https://github.com/0x009922/parity-scale-trivial-num-casts-issue