Y
Hacker News
new
|
ask
|
show
|
jobs
by
stefano_c
2164 days ago
What would you suggest for replacing e.g. `u8 as usize`?
1 comments
steveklabnik
2164 days 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.
link
The numeric casts are the easy part of this.