|
|
|
|
|
by carlmr
2674 days ago
|
|
In Rust release builds the integer overflow of checks are disabled. They're not zero cost and there's no magical way to do it, so it's only done in debug builds. You can disable them in debug builds as well with wrapping integers. So this is again a practice of making the safer option the default, but won't incur runtime costs if it bothers you. If there is a way to do it at compile time that will usually be used in rust. |
|