diff options
| author | Mica White <botahamec@gmail.com> | 2024-12-01 15:28:44 -0500 |
|---|---|---|
| committer | Mica White <botahamec@gmail.com> | 2024-12-01 15:29:19 -0500 |
| commit | 48aaedad542b9c6cbdc85d22517cd0d151f38443 (patch) | |
| tree | b5b197c47476e88b9926852c73a84f24b6497c77 /src/poisonable/poisonable.rs | |
| parent | 0140f58043a2a00312d31907253cc718985e1e6c (diff) | |
Unit testing
Diffstat (limited to 'src/poisonable/poisonable.rs')
| -rw-r--r-- | src/poisonable/poisonable.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/poisonable/poisonable.rs b/src/poisonable/poisonable.rs index 61264ef..2c7eeff 100644 --- a/src/poisonable/poisonable.rs +++ b/src/poisonable/poisonable.rs @@ -282,7 +282,7 @@ impl<L: Lockable + RawLock> Poisonable<L> { /// use happylock::{Mutex, Poisonable}; /// /// let mutex = Poisonable::new(Mutex::new(0)); - /// assert_eq!(mutex.inner_lock().unwrap().into_inner(), 0); + /// assert_eq!(mutex.into_inner_lock().unwrap().into_inner(), 0); /// ``` pub fn into_inner_lock(self) -> PoisonResult<L> { if self.is_poisoned() { @@ -306,7 +306,7 @@ impl<L: Lockable + RawLock> Poisonable<L> { /// /// let key = ThreadKey::get().unwrap(); /// let mut mutex = Poisonable::new(Mutex::new(0)); - /// *mutex.lock_mut().unwrap().as_mut() = 10; + /// *mutex.inner_lock_mut().unwrap().as_mut() = 10; /// assert_eq!(*mutex.lock(key).unwrap(), 10); /// ``` pub fn inner_lock_mut(&mut self) -> PoisonResult<&mut L> { |
