Macro avr_oxide::panic_if_none

source ·
macro_rules! panic_if_none {
    ($result:expr) => { ... };
    ($result:expr,$paniccode:expr) => { ... };
}
Expand description

A macro you can use as a substitute for .unwrap() on Options that will simply panic if the result is None. You will want this to avoid hauling in all of the garbage associated with the Debug and Formatter types that comes along with the ‘real’ unwrap() implementation. With small EEPROMs/Flash we don’t have the room for that luxury.