Skip to content

Commit

Permalink
Clarify that locking on Windows also works for files opened with `.re…
Browse files Browse the repository at this point in the history
…ad(true)`
  • Loading branch information
joshtriplett authored and gitbot committed Feb 22, 2025
1 parent 5ff3d29 commit 386e750
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions std/src/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,7 @@ impl File {
/// this [may change in the future][changes].
///
/// On Windows, locking a file will fail if the file is opened only for append. To lock a file,
/// open it with either `.read(true).append(true)` or `.write(true)`.
/// open it with one of `.read(true)`, `.read(true).append(true)`, or `.write(true)`.
///
/// [changes]: io#platform-specific-behavior
///
Expand Down Expand Up @@ -702,7 +702,7 @@ impl File {
/// [may change in the future][changes].
///
/// On Windows, locking a file will fail if the file is opened only for append. To lock a file,
/// open it with either `.read(true).append(true)` or `.write(true)`.
/// open it with one of `.read(true)`, `.read(true).append(true)`, or `.write(true)`.
///
/// [changes]: io#platform-specific-behavior
///
Expand Down Expand Up @@ -760,7 +760,7 @@ impl File {
/// [may change in the future][changes].
///
/// On Windows, locking a file will fail if the file is opened only for append. To lock a file,
/// open it with either `.read(true).append(true)` or `.write(true)`.
/// open it with one of `.read(true)`, `.read(true).append(true)`, or `.write(true)`.
///
/// [changes]: io#platform-specific-behavior
///
Expand Down Expand Up @@ -817,7 +817,7 @@ impl File {
/// [may change in the future][changes].
///
/// On Windows, locking a file will fail if the file is opened only for append. To lock a file,
/// open it with either `.read(true).append(true)` or `.write(true)`.
/// open it with one of `.read(true)`, `.read(true).append(true)`, or `.write(true)`.
///
/// [changes]: io#platform-specific-behavior
///
Expand Down Expand Up @@ -862,7 +862,7 @@ impl File {
/// [may change in the future][changes].
///
/// On Windows, locking a file will fail if the file is opened only for append. To lock a file,
/// open it with either `.read(true).append(true)` or `.write(true)`.
/// open it with one of `.read(true)`, `.read(true).append(true)`, or `.write(true)`.
///
/// [changes]: io#platform-specific-behavior
///
Expand Down

0 comments on commit 386e750

Please sign in to comment.