From e98635ad8f9015f3749a8d90099ebd37bfb8100c Mon Sep 17 00:00:00 2001 From: Mica White Date: Fri, 8 Mar 2024 15:34:07 -0500 Subject: Allow moves --- examples/list.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'examples/list.rs') diff --git a/examples/list.rs b/examples/list.rs index 448f70a..f9b8db8 100644 --- a/examples/list.rs +++ b/examples/list.rs @@ -1,11 +1,10 @@ use std::thread; -use happylock::mutex::{Mutex, SpinLock}; -use happylock::{LockGuard, ThreadKey}; +use happylock::{LockGuard, Mutex, ThreadKey}; const N: usize = 10; -static DATA: [SpinLock; 6] = [ +static DATA: [Mutex; 6] = [ Mutex::new(0), Mutex::new(1), Mutex::new(2), @@ -14,7 +13,7 @@ static DATA: [SpinLock; 6] = [ Mutex::new(5), ]; -static SEED: SpinLock = Mutex::new(42); +static SEED: Mutex = Mutex::new(42); fn random(key: &mut ThreadKey) -> usize { let mut seed = SEED.lock(key); -- cgit v1.2.3