Macro unwrap_all

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

Use it like this: unwrap_all!(n_times, object)

use unwrap_all::unwrap_all;

let nested = Some(Ok::<usize, ()>(42));
let unpacked = unwrap_all!(2, nested);

assert_eq!(42, unpacked);