Clarify try! doc example

The original is correct, but a bit misleading.
This commit is contained in:
Szabolcs Berecz 2016-04-12 01:18:35 +02:00
parent 526f2bf5c5
commit 0c8a7f293d

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");