[−][src]Macro unwrap_return::ok_unwrap_do
Unwraps in the Ok
case; does something in the Err
case.
Drops everything contained within Err.
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.
ok_unwrap_do!(expression, do)
is shorthand for
match expression { Ok(ret) => ret, Err(_) => { do } }