We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fe61575 commit 07e0182Copy full SHA for 07e0182
library/std/src/io/cursor.rs
@@ -51,6 +51,8 @@ use crate::io::{self, BorrowedCursor, ErrorKind, IoSlice, IoSliceMut, SeekFrom};
51
/// // We might want to use a BufReader here for efficiency, but let's
52
/// // keep this example focused.
53
/// let mut file = File::create("foo.txt")?;
54
+/// // First, we need to allocate 10 bytes to be able to write into.
55
+/// file.set_len(10)?;
56
///
57
/// write_ten_bytes_at_end(&mut file)?;
58
/// # Ok(())
0 commit comments