Skip to content

Commit 0c8a7f2

Browse files
committed
Clarify try! doc example
The original is correct, but a bit misleading.
1 parent 526f2bf commit 0c8a7f2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libcore/macros.rs

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

0 commit comments

Comments
 (0)