Y
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
devit
2166 days ago
into()/try_into() and methods designed for each of the other cases (e.g. truncate(), saturating_to_int(), approx_to_float(), etc.)
link
erk__
2166 days ago
Using `x.into()` instead or `x.try_into()` if it can fail.
link