#macro #unwrap #options #result #no-std

no-std unwrap_return

A set of macros for returns and breaks in the None and Err cases

3 releases

0.1.2 Jul 26, 2020
0.1.1 Jul 4, 2020
0.1.0 Jul 1, 2020

#2948 in Rust patterns

38 downloads per month

Custom license

6KB
54 lines

A set of macros for returns and breaks in the None and Err cases. Replaces repetitive code similar to

match expression {
    Some(ret) => ret,
    None => return
}

with simpler macros such as

unwrap_return!(expression)

No runtime deps