Skip to content

Instantly share code, notes, and snippets.

@reissbaker
Created December 23, 2014 05:11
Show Gist options
  • Save reissbaker/a4701e180d6e4526d2b1 to your computer and use it in GitHub Desktop.
Save reissbaker/a4701e180d6e4526d2b1 to your computer and use it in GitHub Desktop.
match vs and_then
io_result.and_then(|result| {
// do something
}).ok();
match io_result {
Ok(result) => {
// do something
},
_ => ()
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment