Function tool::monad::unwrap
[−]
[src]
pub fn unwrap<U: Unwrap>(unwrappable: U) -> U::Value
Unwraps the value.
use tool::unwrap; let unwrapped: Vec<_> = vec![Result::Ok::<i32, ()>(1)].into_iter().map(unwrap).collect(); assert_eq!(unwrapped, vec![1]); let unwrapped2: Vec<_> = vec![Some(2)].into_iter().map(unwrap).collect(); assert_eq!(unwrapped2, vec![2]);Run