about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJubilee <workingjubilee@gmail.com>2024-10-29 03:11:43 -0700
committerGitHub <noreply@github.com>2024-10-29 03:11:43 -0700
commit29a7ca993d6135d72a018fc986cc8c248f990d9a (patch)
tree79468b5efe66815e4302a1e2a6eced56019d57da
parent423d4f0c2f545b6dad6f80f15607c385b0254bcc (diff)
parent5910a4f1bce6f98cf5a0692478b2e09bbb734ce2 (diff)
downloadrust-29a7ca993d6135d72a018fc986cc8c248f990d9a.tar.gz
rust-29a7ca993d6135d72a018fc986cc8c248f990d9a.zip
Rollup merge of #132270 - yakiimoninja:fs-truncate-docs, r=Noratrieb
clarified doc for `std::fs::OpenOptions.truncate()`

Clarified what method does when `std::fs::OpenOptions.truncate()` parameter is set to `true`.
-rw-r--r--library/std/src/fs.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/library/std/src/fs.rs b/library/std/src/fs.rs
index 8a0d2a7f5cf..3079c8b1d90 100644
--- a/library/std/src/fs.rs
+++ b/library/std/src/fs.rs
@@ -1197,7 +1197,7 @@ impl OpenOptions {
 
     /// Sets the option for truncating a previous file.
     ///
-    /// If a file is successfully opened with this option set it will truncate
+    /// If a file is successfully opened with this option set to true, it will truncate
     /// the file to 0 length if it already exists.
     ///
     /// The file must be opened with write access for truncate to work.