Skip to content

Commit

Permalink
Merge #1092
Browse files Browse the repository at this point in the history
1092: Clippy fixes r=cuviper a=cuviper

- Fix `clippy::incorrect_clone_impl_on_copy_type` (denied)
- Fix `clippy::unnecessary_cast` (warning)


Co-authored-by: Josh Stone <[email protected]>
  • Loading branch information
bors[bot] and cuviper authored Sep 19, 2023
2 parents 43868a3 + c8bb6ca commit 741d2b4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions rayon-core/src/sleep/counters.rs
Original file line number Diff line number Diff line change
Expand Up @@ -212,12 +212,12 @@ impl AtomicCounters {

#[inline]
fn select_thread(word: usize, shift: usize) -> usize {
((word >> shift) as usize) & THREADS_MAX
(word >> shift) & THREADS_MAX
}

#[inline]
fn select_jec(word: usize) -> usize {
(word >> JEC_SHIFT) as usize
word >> JEC_SHIFT
}

impl Counters {
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ impl<T> SendPtr<T> {
// Implement Clone without the T: Clone bound from the derive
impl<T> Clone for SendPtr<T> {
fn clone(&self) -> Self {
Self(self.0)
*self
}
}

Expand Down

0 comments on commit 741d2b4

Please sign in to comment.