34766a6792
Disable `cast_lossless` when casting to u128 from any (u)int type Fixes https://github.com/rust-lang/rust-clippy/issues/12492 Disables `cast_lossless` when casting to u128 from any int or uint type. The lint states that when casting to any int type, there can potentially be lossy behaviour if the source type ever exceeds the size of the destination type in the future, which is impossible with a destination of u128. It's possible this is a bit of a niche edge case which is better addressed by just disabling the lint in code, but I personally couldn't think of any good reason to still lint in this specific case - maybe except if the source is a bool, for readability reasons :). changelog: FP: `cast_lossless`: disable lint when casting to u128 from any (u)int type |
||
---|---|---|
.. | ||
src | ||
Cargo.toml | ||
README.md |