From 055e6fd92326e4796dccd13948b400719f65b546 Mon Sep 17 00:00:00 2001 From: Mica White Date: Sat, 7 Feb 2026 13:16:39 -0500 Subject: Finish documentation --- src/collection/boxed.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/collection/boxed.rs') 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 BoxedLockCollection { /// # 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 BoxedLockCollection { /// # 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"); /// ``` /// -- cgit v1.2.3