Skip to content

Instantly share code, notes, and snippets.

@brson
Created January 13, 2012 22:42
Show Gist options
  • Save brson/1609169 to your computer and use it in GitHub Desktop.
Save brson/1609169 to your computer and use it in GitHub Desktop.
#[test]
fn try_success() {
alt task::try {||
"Success!"
} {
result::ok("Success!") { }
_ { fail; }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment