diff options
| author | Matthew Van Schellebeeck <mvanschellebeeck@gmail.com> | 2022-10-16 08:18:56 -0400 |
|---|---|---|
| committer | Matthew Van Schellebeeck <mvanschellebeeck@gmail.com> | 2022-10-17 22:25:28 -0500 |
| commit | ccd73c0a815bbf5bdb1d215e0e0417f5ea216e68 (patch) | |
| tree | 794705eaf9218599ce7198b4782cee45f5715006 /exercises/threads/threads2.rs | |
| parent | b3322e36ae182a0285ac94eb1df8850097988157 (diff) | |
style: explicitly use Arc::clone
Diffstat (limited to 'exercises/threads/threads2.rs')
| -rw-r--r-- | exercises/threads/threads2.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/exercises/threads/threads2.rs b/exercises/threads/threads2.rs index d0f8578..ada3d14 100644 --- a/exercises/threads/threads2.rs +++ b/exercises/threads/threads2.rs @@ -17,7 +17,7 @@ fn main() { let status = Arc::new(JobStatus { jobs_completed: 0 }); let mut handles = vec![]; for _ in 0..10 { - let status_shared = status.clone(); + let status_shared = Arc::clone(&status); let handle = thread::spawn(move || { thread::sleep(Duration::from_millis(250)); // TODO: You must take an action before you update a shared value |
