flatten method
Flattens a nested Option type value one level.
Returns:
- Some<T> if this
Optionis Some<Option<T>>. - None<T> if this
Optionis None<Option<T>>.
See also:
Rust: Option::flatten()
Implementation
Option<T> flatten() => andThen(identity);