From 922f0618d1b1616f1bb3b8046948b47e4fadf29d Mon Sep 17 00:00:00 2001 From: aheart Date: Thu, 4 Jan 2018 15:55:01 +0200 Subject: [PATCH] Make examples equivalent The example with the ? operator was missing file.write_all --- src/libcore/macros.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libcore/macros.rs b/src/libcore/macros.rs index 948ad104cdf2f..f00128a8147de 100644 --- a/src/libcore/macros.rs +++ b/src/libcore/macros.rs @@ -330,6 +330,7 @@ macro_rules! debug_assert_ne { /// // The prefered method of quick returning Errors /// fn write_to_file_question() -> Result<(), MyError> { /// let mut file = File::create("my_best_friends.txt")?; +/// file.write_all(b"This is a list of my best friends.")?; /// Ok(()) /// } ///