Clarify try! doc example
The original is correct, but a bit misleading.
This commit is contained in:
parent
526f2bf5c5
commit
0c8a7f293d
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user