未验证 提交 684c6d17 编写于 作者: K kennytm

Rollup merge of #48480 - jethrogb:patch-5, r=alexcrichton

Clarify interfaction between File::set_len and file cursor
......@@ -453,6 +453,10 @@ pub fn sync_data(&self) -> io::Result<()> {
/// 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.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册