diff options
| author | Alexis Bourget <alexis.bourget@gmail.com> | 2020-08-30 21:59:43 +0200 |
|---|---|---|
| committer | Alexis Bourget <alexis.bourget@gmail.com> | 2020-08-30 21:59:43 +0200 |
| commit | 81e85ce76d6630a8f87f81df2470e76fbe73de7d (patch) | |
| tree | 55988a948bd8b9f80aba09c8a6e9ef8d13eaf6e1 /library/std/src/sys_common | |
| parent | 85fbf49ce0e2274d0acf798f6e703747674feec3 (diff) | |
| download | rust-81e85ce76d6630a8f87f81df2470e76fbe73de7d.tar.gz rust-81e85ce76d6630a8f87f81df2470e76fbe73de7d.zip | |
Move to Arc::clone(&x) over x.clone() in library/std
Diffstat (limited to 'library/std/src/sys_common')
| -rw-r--r-- | library/std/src/sys_common/poison.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/library/std/src/sys_common/poison.rs b/library/std/src/sys_common/poison.rs index 3f079da9098..2ab2c700a1b 100644 --- a/library/std/src/sys_common/poison.rs +++ b/library/std/src/sys_common/poison.rs @@ -65,7 +65,7 @@ pub struct Guard { /// let mutex = Arc::new(Mutex::new(1)); /// /// // poison the mutex -/// let c_mutex = mutex.clone(); +/// let c_mutex = Arc::clone(&mutex); /// let _ = thread::spawn(move || { /// let mut data = c_mutex.lock().unwrap(); /// *data = 2; @@ -168,7 +168,7 @@ impl<T> PoisonError<T> { /// let mutex = Arc::new(Mutex::new(HashSet::new())); /// /// // poison the mutex - /// let c_mutex = mutex.clone(); + /// let c_mutex = Arc::clone(&mutex); /// let _ = thread::spawn(move || { /// let mut data = c_mutex.lock().unwrap(); /// data.insert(10); |
