Skip to content

Commit 32d700f

Browse files
committed
Fix clippy::legacy_numeric_constants
(cherry picked from commit b2f7393)
1 parent f4533cd commit 32d700f

File tree

4 files changed

+2
-8
lines changed

4 files changed

+2
-8
lines changed

rayon-core/src/latch.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ use std::marker::PhantomData;
22
use std::ops::Deref;
33
use std::sync::atomic::{AtomicUsize, Ordering};
44
use std::sync::{Arc, Condvar, Mutex};
5-
use std::usize;
65

76
use crate::registry::{Registry, WorkerThread};
87

rayon-core/src/registry.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ use std::ptr;
1818
use std::sync::atomic::{AtomicUsize, Ordering};
1919
use std::sync::{Arc, Mutex, Once};
2020
use std::thread;
21-
use std::usize;
2221

2322
/// Thread builder used for customization via
2423
/// [`ThreadPoolBuilder::spawn_handler`](struct.ThreadPoolBuilder.html#method.spawn_handler).
@@ -599,10 +598,7 @@ impl Registry {
599598
pub(super) fn increment_terminate_count(&self) {
600599
let previous = self.terminate_count.fetch_add(1, Ordering::AcqRel);
601600
debug_assert!(previous != 0, "registry ref count incremented from zero");
602-
assert!(
603-
previous != std::usize::MAX,
604-
"overflow in registry ref count"
605-
);
601+
assert!(previous != usize::MAX, "overflow in registry ref count");
606602
}
607603

608604
/// Signals that the thread-pool which owns this registry has been

rayon-core/src/sleep/counters.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ pub(super) struct Counters {
2727
pub(super) struct JobsEventCounter(usize);
2828

2929
impl JobsEventCounter {
30-
pub(super) const DUMMY: JobsEventCounter = JobsEventCounter(std::usize::MAX);
30+
pub(super) const DUMMY: JobsEventCounter = JobsEventCounter(usize::MAX);
3131

3232
#[inline]
3333
pub(super) fn as_usize(self) -> usize {

rayon-core/src/sleep/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ use crossbeam_utils::CachePadded;
88
use std::sync::atomic::Ordering;
99
use std::sync::{Condvar, Mutex};
1010
use std::thread;
11-
use std::usize;
1211

1312
mod counters;
1413
pub(crate) use self::counters::THREADS_MAX;

0 commit comments

Comments
 (0)