From a3b55a59a5b83a65868812248b4efb50bb6a6ffe Mon Sep 17 00:00:00 2001 From: sunface Date: Wed, 15 Mar 2023 13:03:11 +0800 Subject: [PATCH] update thread.md about reference --- src/advance/concurrency-with-threads/thread.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/advance/concurrency-with-threads/thread.md b/src/advance/concurrency-with-threads/thread.md index b8c8910e..33ac2134 100644 --- a/src/advance/concurrency-with-threads/thread.md +++ b/src/advance/concurrency-with-threads/thread.md @@ -447,14 +447,14 @@ fn main() { let pair2 = pair.clone(); thread::spawn(move|| { - let &(ref lock, ref cvar) = &*pair2; + let (lock, cvar) = &*pair2; let mut started = lock.lock().unwrap(); println!("changing started"); *started = true; cvar.notify_one(); }); - let &(ref lock, ref cvar) = &*pair; + let (lock, cvar) = &*pair; let mut started = lock.lock().unwrap(); while !*started { started = cvar.wait(started).unwrap();