about summary refs log tree commit diff
path: root/library/core/src/sync
diff options
context:
space:
mode:
authorAlexis Bourget <alexis.bourget@gmail.com>2020-08-30 22:14:17 +0200
committerAlexis Bourget <alexis.bourget@gmail.com>2020-08-30 22:14:17 +0200
commit6b75e3d11b89671df0a3f284252584414bfe17d9 (patch)
treea6b8c4bf7eac3aabf2d1b18575b2d94b7f2f8ea1 /library/core/src/sync
parent81e85ce76d6630a8f87f81df2470e76fbe73de7d (diff)
downloadrust-6b75e3d11b89671df0a3f284252584414bfe17d9.tar.gz
rust-6b75e3d11b89671df0a3f284252584414bfe17d9.zip
Move to Arc::clone(&x) over x.clone() in library/core
Diffstat (limited to 'library/core/src/sync')
-rw-r--r--library/core/src/sync/atomic.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/library/core/src/sync/atomic.rs b/library/core/src/sync/atomic.rs
index 1aec7e1b5f8..38eabaaa396 100644
--- a/library/core/src/sync/atomic.rs
+++ b/library/core/src/sync/atomic.rs
@@ -76,7 +76,7 @@
 //! fn main() {
 //!     let spinlock = Arc::new(AtomicUsize::new(1));
 //!
-//!     let spinlock_clone = spinlock.clone();
+//!     let spinlock_clone = Arc::clone(&spinlock);
 //!     let thread = thread::spawn(move|| {
 //!         spinlock_clone.store(0, Ordering::SeqCst);
 //!     });