There used to be a fn std::num::cast
that would cast between integer types and return an Option
(returning None
if the cast was invalid). Where did that functionality go?
Similarily to previous question, that functionality moved to num crate. More precisely, It's in num::traits::cast.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With