From a9467214084402e09c3363c4ec1afcc8caf32715 Mon Sep 17 00:00:00 2001 From: yakiimoninja <80072600+yakiimoninja@users.noreply.github.com> Date: Mon, 28 Oct 2024 16:07:20 +0000 Subject: [PATCH 1/2] clarified doc for `std::fs::OpenOptions.truncate()` Clarified what method does when `truncate` parameter is set to `true`. --- library/std/src/fs.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/std/src/fs.rs b/library/std/src/fs.rs index 8a0d2a7f5cfcf..5229925ceedc1 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 as 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. From 5910a4f1bce6f98cf5a0692478b2e09bbb734ce2 Mon Sep 17 00:00:00 2001 From: yakiimoninja <80072600+yakiimoninja@users.noreply.github.com> Date: Mon, 28 Oct 2024 17:14:15 +0000 Subject: [PATCH 2/2] clarified std::fs truncate doc Co-authored-by: nora <48135649+Noratrieb@users.noreply.github.com> --- library/std/src/fs.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/std/src/fs.rs b/library/std/src/fs.rs index 5229925ceedc1..3079c8b1d905a 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 as true, 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.