Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
stefano_c
· 6y ago · 0 comments
What would you suggest for replacing e.g. `u8 as usize`?
Comments
[–]
steveklabnik
6y ago
For 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.