checked

Macro checked 

Source
checked!() { /* proc-macro */ }
Expand description

Defines a block of code where all mathematical operations are performed using checked methods.

If any operation overflows, it will panic with a corresponding error message.

ยงExample

use overf::checked;

checked! {
    let a = 10usize + 5usize;
    let b = 20usize - 10usize;
    let c = 3usize * 7usize;
}