wrap_result

Crates.iowrap_result
lib.rswrap_result
version0.1.1
sourcesrc
created_at2021-03-30 02:50:13.941447
updated_at2021-03-30 02:53:54.360454
descriptioneasy to wrap Ok(value) , Err(value) or Some(value)
homepage
repository
max_upload_size
id375445
size3,738
ppc (hjiayz)

documentation

README

wrap_result

Examples

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));
Commit count: 0

cargo fmt