diff options
| author | Ulrich Stark <github@ustark.de> | 2025-08-07 14:04:12 +0200 |
|---|---|---|
| committer | Ulrich Stark <github@ustark.de> | 2025-08-07 14:13:11 +0200 |
| commit | 488876281660590f08083578084163be5266b854 (patch) | |
| tree | ceb1aa4b68e4ef02cd6adbbeb121a41a1e981e45 /library/std/src/fs.rs | |
| parent | 9b1a30e5e69e1537ef6eb6eb829eb47075206dea (diff) | |
| download | rust-488876281660590f08083578084163be5266b854.tar.gz rust-488876281660590f08083578084163be5266b854.zip | |
Fix doc comment of File::try_lock and File::try_lock_shared
Diffstat (limited to 'library/std/src/fs.rs')
| -rw-r--r-- | library/std/src/fs.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/library/std/src/fs.rs b/library/std/src/fs.rs index b3ca118a452..a220a3f56e9 100644 --- a/library/std/src/fs.rs +++ b/library/std/src/fs.rs @@ -814,7 +814,7 @@ impl File { /// /// If this file handle/descriptor, or a clone of it, already holds a lock, the exact behavior /// is unspecified and platform dependent, including the possibility that it will deadlock. - /// However, if this method returns `Ok(true)`, then it has acquired an exclusive lock. + /// However, if this method returns `Ok(())`, then it has acquired an exclusive lock. /// /// If the file is not open for writing, it is unspecified whether this function returns an error. /// @@ -879,7 +879,7 @@ impl File { /// /// If this file handle, or a clone of it, already holds a lock, the exact behavior is /// unspecified and platform dependent, including the possibility that it will deadlock. - /// However, if this method returns `Ok(true)`, then it has acquired a shared lock. + /// However, if this method returns `Ok(())`, then it has acquired a shared lock. /// /// The lock will be released when this file (along with any other file descriptors/handles /// duplicated or inherited from it) is closed, or if the [`unlock`] method is called. |
