I would do:
option.unwrap_or_else(|| panic!("ah: {}", "nuts"))
Formatting a string is somewhat costly. This will avoid formatting the string unless it is really needed.
I would do:
option.unwrap_or_else(|| panic!("ah: {}", "nuts"))
Formatting a string is somewhat costly. This will avoid formatting the string unless it is really needed.