unwrap method

T unwrap()

Returns the held value of this Result if it is Ok.

Warning: This method is unsafe. A ResultError will be thrown when this method is called if this Result is Err.

See also: Rust: Result::unwrap()

Implementation

T unwrap() => switch (this) {
	Ok(:T v) => v,
	Err() => throw ResultError(
		'called `Result#unwrap()` on an `Err` value',
		original: this
	)
};