Skip to content

Commit 338a3e0

Browse files
authored
Rollup merge of #145046 - ulrichstark:master, r=tgross35
Fix doc comment of File::try_lock and File::try_lock_shared The doc comments of functions `File::try_lock` and `File::try_lock_shared` stabilized today in version 1.89.0 document an incorrect type of `Ok`. The result type was changed in #139343 after the latest change to the doc comments in #136876.
2 parents 3c18b6c + 4888762 commit 338a3e0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

library/std/src/fs.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -814,7 +814,7 @@ impl File {
814814
///
815815
/// If this file handle/descriptor, or a clone of it, already holds a lock, the exact behavior
816816
/// is unspecified and platform dependent, including the possibility that it will deadlock.
817-
/// However, if this method returns `Ok(true)`, then it has acquired an exclusive lock.
817+
/// However, if this method returns `Ok(())`, then it has acquired an exclusive lock.
818818
///
819819
/// If the file is not open for writing, it is unspecified whether this function returns an error.
820820
///
@@ -879,7 +879,7 @@ impl File {
879879
///
880880
/// If this file handle, or a clone of it, already holds a lock, the exact behavior is
881881
/// unspecified and platform dependent, including the possibility that it will deadlock.
882-
/// However, if this method returns `Ok(true)`, then it has acquired a shared lock.
882+
/// However, if this method returns `Ok(())`, then it has acquired a shared lock.
883883
///
884884
/// The lock will be released when this file (along with any other file descriptors/handles
885885
/// duplicated or inherited from it) is closed, or if the [`unlock`] method is called.

0 commit comments

Comments
 (0)