foo().unwrap_or_else({ |e| return Err(e) })
a := try!(foo)
a, err := foo() if err != nil { return nil, err }
https://doc.rust-lang.org/beta/std/result/ has lots of examples of alternative ways you can deal with the error case, or the Ok() case of a result.
https://doc.rust-lang.org/beta/std/result/ has lots of examples of alternative ways you can deal with the error case, or the Ok() case of a result.