let u: usize = u16::MAX.try_into().unwrap(); Clippy suggests using .into().
warning: use of a fallible conversion when an infallible one could be used
Although we use 64-bit targets nowadays, but I think the conversion is still fallible if we need to compile for targets using 8-bit or even smaller pointer size, e.g, microcontroller or single chip?
let u: usize = u16::MAX.try_into().unwrap();Clippy suggests using .into().warning: use of a fallible conversion when an infallible one could be usedAlthough we use 64-bit targets nowadays, but I think the conversion is still fallible if we need to compile for targets using 8-bit or even smaller pointer size, e.g, microcontroller or single chip?