Skip to content

Commit cfad25e

Browse files
authored
Clarify interfaction between File::set_len and file cursor
1 parent 063deba commit cfad25e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/libstd/fs.rs

+4
Original file line numberDiff line numberDiff line change
@@ -453,6 +453,10 @@ impl File {
453453
/// will be extended to `size` and have all of the intermediate data filled
454454
/// in with 0s.
455455
///
456+
/// The file's cursor isn't changed. In particular, if the cursor was at the
457+
/// end and the file is shrunk using this operation, the cursor will now be
458+
/// past the end.
459+
///
456460
/// # Errors
457461
///
458462
/// This function will return an error if the file is not opened for writing.

0 commit comments

Comments
 (0)