Skip to content

Commit 1791414

Browse files
authored
Rollup merge of #47182 - aheart:master, r=steveklabnik
Equivalent example for ? operator The example with the ? operator in the documentation for try! macro was missing file.write_all. Now all three examples are consistent.
2 parents a4e4899 + 922f061 commit 1791414

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)