Rust

Rust

Made by DeepSource

Found error-prone cast to u8 RS-W1080

Anti-pattern
Minor
Autofix

Casting values from a larger type to a smaller type is error-prone. This can be avoided when casting char literals to u8 by using the byte literal directly.

Bad practice

'x' as u8;

Recommended

b'x';