diff options
| author | kennytm <kennytm@gmail.com> | 2018-03-13 05:00:26 +0800 |
|---|---|---|
| committer | kennytm <kennytm@gmail.com> | 2018-03-13 05:00:26 +0800 |
| commit | 684c6d17c575893b4cd4913f2558cb8731785c01 (patch) | |
| tree | 8860cc786e1f4087e777b93a8ea522198d234bde /src/libstd | |
| parent | 34d9ffec17b820a5ec7d609e1022f72314f9c3b8 (diff) | |
| parent | cfad25ee8fb9866d0cbdc43e3a89a00aed13e12c (diff) | |
Rollup merge of #48480 - jethrogb:patch-5, r=alexcrichton
Clarify interfaction between File::set_len and file cursor
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/fs.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libstd/fs.rs b/src/libstd/fs.rs index 292a78278ab..db52ed67d3a 100644 --- a/src/libstd/fs.rs +++ b/src/libstd/fs.rs @@ -453,6 +453,10 @@ impl File { /// will be extended to `size` and have all of the intermediate data filled /// in with 0s. /// + /// The file's cursor isn't changed. In particular, if the cursor was at the + /// end and the file is shrunk using this operation, the cursor will now be + /// past the end. + /// /// # Errors /// /// This function will return an error if the file is not opened for writing. |
