[][src]Macro unwrap_return::unwrap_do

macro_rules! unwrap_do {
    ($e:expr, $d:expr) => { ... };
}

Unwraps in the Some case; does something in the None case.

Usually you want unwrap_or_else from the standard library. Use this for cases where you need to do something simple before returning or breaking, or you want to return a value.

 unwrap_do!(expression, do)

is shorthand for

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