unwrap method

T unwrap()

Returns the held value of this Option if it is Some.

Warning: This method is unsafe. An OptionError will be thrown when this method is called if this Option is None.

See also: Rust: Option::unwrap()

Implementation

T unwrap() => switch (this) {
	Some(value: T value) => value,
	None() => throw OptionError('called `Option#unwrap()` on a `None` value')
};