diff options
| author | Mica White <botahamec@outlook.com> | 2026-02-07 13:16:39 -0500 |
|---|---|---|
| committer | Mica White <botahamec@outlook.com> | 2026-02-07 13:16:39 -0500 |
| commit | 055e6fd92326e4796dccd13948b400719f65b546 (patch) | |
| tree | a1b33f31a4820a3826a0ce59249c0f10e699648d /src/collection/boxed.rs | |
| parent | c3a33edff89e96343d6413e597891f9718d0088f (diff) | |
Finish documentation
Diffstat (limited to 'src/collection/boxed.rs')
| -rwxr-xr-x | src/collection/boxed.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/collection/boxed.rs b/src/collection/boxed.rs index 234fa07..83675b5 100755 --- a/src/collection/boxed.rs +++ b/src/collection/boxed.rs @@ -560,10 +560,10 @@ impl<L: Sharable> BoxedLockCollection<L> { /// # Example /// /// ``` - /// use happylock::{LockCollection, ThreadKey, Mutex}; + /// use happylock::{LockCollection, ThreadKey, RwLock}; /// /// let mut key = ThreadKey::get().unwrap(); - /// let data = (Mutex::new(0), Mutex::new("")); + /// let data = (RwLock::new(0), RwLock::new("")); /// let lock = LockCollection::new(data); /// /// lock.scoped_read(&mut key, |(number, string)| { @@ -602,15 +602,15 @@ impl<L: Sharable> BoxedLockCollection<L> { /// # Example /// /// ``` - /// use happylock::{LockCollection, ThreadKey, Mutex}; + /// use happylock::{LockCollection, ThreadKey, RwLock}; /// /// let mut key = ThreadKey::get().unwrap(); - /// let data = (Mutex::new(0), Mutex::new("")); + /// let data = (RwLock::new(0), RwLock::new("")); /// let lock = LockCollection::new(data); /// /// lock.scoped_try_read(&mut key, |(number, string)| { - /// *number += 1; - /// *string = "1"; + /// assert_eq!(*number, 0); + /// assert_eq!(*string, ""); /// }).expect("This lock has not yet been locked"); /// ``` /// |
