Hacker News new | ask | show | jobs
by 95th 2166 days ago
Then what do you propose for replacement? C++ style casts `(int) x` ?
2 comments

into()/try_into() and methods designed for each of the other cases (e.g. truncate(), saturating_to_int(), approx_to_float(), etc.)
Using `x.into()` instead or `x.try_into()` if it can fail.