Crates.io | wrap_result |
lib.rs | wrap_result |
version | 0.1.1 |
source | src |
created_at | 2021-03-30 02:50:13.941447 |
updated_at | 2021-03-30 02:53:54.360454 |
description | easy to wrap Ok(value) , Err(value) or Some(value) |
homepage | |
repository | |
max_upload_size | |
id | 375445 |
size | 3,738 |
use wrap_result::*;
let x = 0;
assert_eq!(x.wrap_ok(), Result::<u32,u32>::Ok(x));
assert_eq!(x.wrap_err(), Result::<u32,u32>::Err(x));
assert_eq!(x.wrap_some(), Some(x));