3 ms·
> There's also wrapping_add / saturating_add for anyone concerned about this. Ya want a specific behavior? Just tell the compiler! That is exactly why Rust's b
by kllrnohj 4mo ago
> There's also wrapping_add / saturating_add for anyone concerned about this. Ya want a specific behavior? Just tell the compiler!
That is exactly why Rust's behavior for +/- operators is a mistake and wrong. It should always panic and anyone that wants something different can specify that in code, where it's clear and explicit.