Skip to main content

wrappit

Attribute Macro wrappit 

Source
#[wrappit]
Expand description

Make addition and multiplication wrapping in the annotated function.

§Example

#[wrapit]
fn oops() -> bool {
    let a: u32 = std::u32::MAX;
    let b: u32 = 2;
    let r = a + b;
    r == 1
}