about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorSzabolcs Berecz <szabolcs.berecz@gmail.com>2016-04-12 01:18:35 +0200
committerSzabolcs Berecz <szabolcs.berecz@gmail.com>2016-04-12 01:18:35 +0200
commit0c8a7f293d212871ef4da0be012f00a00d4dbe39 (patch)
tree5333eeeaa7878f06c20e5176df3420f958857d0e /src
parent526f2bf5c534308193246e13ab2da8b3c0cf3cbb (diff)
downloadrust-0c8a7f293d212871ef4da0be012f00a00d4dbe39.tar.gz
rust-0c8a7f293d212871ef4da0be012f00a00d4dbe39.zip
Clarify try! doc example
The original is correct, but a bit misleading.
Diffstat (limited to 'src')
-rw-r--r--src/libcore/macros.rs2
1 files changed, 1 insertions, 1 deletions
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");