Make examples equivalent
The example with the ? operator was missing file.write_all
This commit is contained in:
parent
4cd918c4ca
commit
922f0618d1
@ -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(())
|
||||
/// }
|
||||
///
|
||||
|
Loading…
x
Reference in New Issue
Block a user