Skip to content

Commit 9d15e85

Browse files
committed
Update outdated docs
1 parent 511e2d2 commit 9d15e85

File tree

2 files changed

+16
-8
lines changed

2 files changed

+16
-8
lines changed

src/file_ext/async_impl.rs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,16 @@ macro_rules! async_file_ext {
4646
/// locked.
4747
fn lock_exclusive(&self) -> Result<()>;
4848

49-
/// Locks the file for shared usage, or returns an error if the file is
50-
/// currently locked (see `lock_contended_error`).
49+
/// Locks the file for shared usage.
50+
///
51+
/// Returns `Ok(true)` if the lock was acquired, `Ok(false)` if the file is currently
52+
/// locked.
5153
fn try_lock_shared(&self) -> Result<bool>;
5254

53-
/// Locks the file for exclusive usage, or returns an error if the file is
54-
/// currently locked (see `lock_contended_error`).
55+
/// Locks the file for exclusive usage.
56+
///
57+
/// Returns `Ok(true)` if the lock was acquired, `Ok(false)` if the file is currently
58+
/// locked.
5559
fn try_lock_exclusive(&self) -> Result<bool>;
5660

5761
/// Unlocks the file.

src/file_ext/sync_impl.rs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,16 @@ macro_rules! file_ext {
4646
/// locked.
4747
fn lock_exclusive(&self) -> Result<()>;
4848

49-
/// Locks the file for shared usage, or returns an error if the file is
50-
/// currently locked (see `lock_contended_error`).
49+
/// Locks the file for shared usage.
50+
///
51+
/// Returns `Ok(true)` if the lock was acquired, `Ok(false)` if the file is currently
52+
/// locked.
5153
fn try_lock_shared(&self) -> Result<bool>;
5254

53-
/// Locks the file for exclusive usage, or returns an error if the file is
54-
/// currently locked (see `lock_contended_error`).
55+
/// Locks the file for exclusive usage.
56+
///
57+
/// Returns `Ok(true)` if the lock was acquired, `Ok(false)` if the file is currently
58+
/// locked.
5559
fn try_lock_exclusive(&self) -> Result<bool>;
5660

5761
/// Unlocks the file.

0 commit comments

Comments
 (0)