From 5955c4dec85ab7812a505be53ba8f5e96beb9753 Mon Sep 17 00:00:00 2001 From: Rageking8 Date: Mon, 5 Dec 2022 16:42:36 +0800 Subject: [PATCH] fix dupe word typos --- core/src/iter/sources/repeat_n.rs | 2 +- core/src/str/pattern.rs | 2 +- std/src/sync/mpmc/array.rs | 2 +- std/src/thread/scoped.rs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/src/iter/sources/repeat_n.rs b/core/src/iter/sources/repeat_n.rs index dc69bf4df..fd8d25ce1 100644 --- a/core/src/iter/sources/repeat_n.rs +++ b/core/src/iter/sources/repeat_n.rs @@ -20,7 +20,7 @@ use crate::mem::ManuallyDrop; /// #![feature(iter_repeat_n)] /// use std::iter; /// -/// // four of the the number four: +/// // four of the number four: /// let mut four_fours = iter::repeat_n(4, 4); /// /// assert_eq!(Some(4), four_fours.next()); diff --git a/core/src/str/pattern.rs b/core/src/str/pattern.rs index d76d6f8b2..19da6d2fb 100644 --- a/core/src/str/pattern.rs +++ b/core/src/str/pattern.rs @@ -1894,7 +1894,7 @@ unsafe fn small_slice_eq(x: &[u8], y: &[u8]) -> bool { // Thus, derefencing both `px` and `py` in the loop below is safe. // // Moreover, we set `pxend` and `pyend` to be 4 bytes before the actual - // end of of `px` and `py`. Thus, the final dereference outside of the + // end of `px` and `py`. Thus, the final dereference outside of the // loop is guaranteed to be valid. (The final comparison will overlap with // the last comparison done in the loop for lengths that aren't multiples // of four.) diff --git a/std/src/sync/mpmc/array.rs b/std/src/sync/mpmc/array.rs index 4db7b4990..f71edc6c5 100644 --- a/std/src/sync/mpmc/array.rs +++ b/std/src/sync/mpmc/array.rs @@ -225,7 +225,7 @@ impl Channel { let slot = unsafe { self.buffer.get_unchecked(index) }; let stamp = slot.stamp.load(Ordering::Acquire); - // If the the stamp is ahead of the head by 1, we may attempt to pop. + // If the stamp is ahead of the head by 1, we may attempt to pop. if head + 1 == stamp { let new = if index + 1 < self.cap { // Same lap, incremented index. diff --git a/std/src/thread/scoped.rs b/std/src/thread/scoped.rs index e6dbf35bd..ada69aa82 100644 --- a/std/src/thread/scoped.rs +++ b/std/src/thread/scoped.rs @@ -46,7 +46,7 @@ impl ScopeData { // We check for 'overflow' with usize::MAX / 2, to make sure there's no // chance it overflows to 0, which would result in unsoundness. if self.num_running_threads.fetch_add(1, Ordering::Relaxed) > usize::MAX / 2 { - // This can only reasonably happen by mem::forget()'ing many many ScopedJoinHandles. + // This can only reasonably happen by mem::forget()'ing a lot of ScopedJoinHandles. self.decrement_num_running_threads(false); panic!("too many running threads in thread scope"); }