1 2 3 4 5 6
use inspector::ResultInspector; fn main() { let ok: Result<_, ()> = Ok(42); ok.inspect(|x| println!("ok value is {}", x)).unwrap(); }