Macro vipers::unwrap_int[][src]

macro_rules! unwrap_int {
    ($option : expr $(,) ?) => { ... };
}
Expand description

Unwraps the result of a checked integer operation.

Example

let one = 1_u64;
let two = 2_u64;
let my_value = unwrap_int!(one.checked_sub(2)); // returns an error
Ok(())