Make examples equivalent

The example with the ? operator was missing file.write_all
This commit is contained in:
aheart 2018-01-04 15:55:01 +02:00 committed by GitHub
parent 4cd918c4ca
commit 922f0618d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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(())
/// }
///