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;
let two = 2;
let my_value = unwrap_int!(one.checked_sub(2)); // returns an error