macro_rules! if_some {
    ( $option:ident, $($function:tt)* ) => { ... };
}
Expand description

Shortcut for

if let Some(thing) = optional_thing {
    thing.<whatever>
}
if_some!(optional_thing, <whatever>);