From 0c8a7f293d212871ef4da0be012f00a00d4dbe39 Mon Sep 17 00:00:00 2001 From: Szabolcs Berecz Date: Tue, 12 Apr 2016 01:18:35 +0200 Subject: [PATCH] Clarify try! doc example The original is correct, but a bit misleading. --- src/libcore/macros.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libcore/macros.rs b/src/libcore/macros.rs index f923668688b..ad90b447508 100644 --- a/src/libcore/macros.rs +++ b/src/libcore/macros.rs @@ -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");