Rollup merge of #32893 - khernyo:clarify-try-doc, r=steveklabnik

Clarify try! doc example

The original is correct, but a bit misleading.

r? @steveklabnik
This commit is contained in:
Steve Klabnik 2016-04-14 14:49:10 -04:00
commit 22877d6f18

View file

@ -182,7 +182,7 @@ macro_rules! debug_assert_eq {
/// fn write_to_file_using_match() -> Result<(), io::Error> {
/// let mut file = try!(File::create("my_best_friends.txt"));
/// match file.write_all(b"This is a list of my best friends.") {
/// Ok(_) => (),
/// Ok(v) => v,
/// Err(e) => return Err(e),
/// }
/// println!("I wrote to the file");