Skip to content

Commit 922f061

Browse files
authored
Make examples equivalent
The example with the ? operator was missing file.write_all
1 parent 4cd918c commit 922f061

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/libcore/macros.rs

+1
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,7 @@ macro_rules! debug_assert_ne {
330330
/// // The prefered method of quick returning Errors
331331
/// fn write_to_file_question() -> Result<(), MyError> {
332332
/// let mut file = File::create("my_best_friends.txt")?;
333+
/// file.write_all(b"This is a list of my best friends.")?;
333334
/// Ok(())
334335
/// }
335336
///

0 commit comments

Comments
 (0)