pub const fn const_unwrap_option<T: Copy>(opt: Option<T>) -> T
Expand description

Unwraps an Option’s Some variant, or panics.

const_unwrap_option is a const fn, and may be called in a const context. Note that, if called from a non-const context, const_unwrap_option will execute at runtime, not at compile time.