3 ms·
FWIW, the former "no-cost" thing does exist in Rust, in the form of "checked_..." methods on the various integer types, e.g. https://doc.rust-lang.org/std/primi
by dbaupp 10y ago
FWIW, the former "no-cost" thing does exist in Rust, in the form of "checked_..." methods on the various integer types, e.g. https://doc.rust-lang.org/std/primitive.i32.html#method.checked_add https://doc.rust-lang.org/std/primitive.i32.html#method.chec... .
- acqq 10y agoThanks! That's the good approach.