Garden 🌻

Option::or_throw()

If this value is Some(value), unwrap it, otherwise throw an exception.

Source Code
public method or_throw<T>(this: Option<T>): T {
  match this {
    Some(v) => v,
    None => throw("Called `or_throw` on a `None` value.")
  }
}