1 2 3 4 5 6 7 8 9 10
#[macro_use] extern crate try; #[test] fn test_try() { fn foo() -> Result<u32, ()> { Ok(try!(Ok(32))) } assert_eq!(foo(), Ok(32)); }