Function vstd::std_specs::option::spec_ok_or

source ·
pub open spec fn spec_ok_or<T, E>(option: Option<T>, err: E) -> Result<T, E>
Expand description
{
    match option {
        Some(t) => Ok(t),
        None => Err(err),
    }
}