3 ms·
What would you suggest for replacing e.g. `u8 as usize`?
by stefano_c 6y ago
What would you suggest for replacing e.g. `u8 as usize`?
- steveklabnik 6y agoFor this one, you could use From/Into, because it cannot fail. For numerics that can fail, TryFrom/TryInto. The numeric casts are the easy part of this.