File tree Expand file tree Collapse file tree 4 files changed +2
-8
lines changed Expand file tree Collapse file tree 4 files changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,6 @@ use std::marker::PhantomData;
2
2
use std:: ops:: Deref ;
3
3
use std:: sync:: atomic:: { AtomicUsize , Ordering } ;
4
4
use std:: sync:: { Arc , Condvar , Mutex } ;
5
- use std:: usize;
6
5
7
6
use crate :: registry:: { Registry , WorkerThread } ;
8
7
Original file line number Diff line number Diff line change @@ -18,7 +18,6 @@ use std::ptr;
18
18
use std:: sync:: atomic:: { AtomicUsize , Ordering } ;
19
19
use std:: sync:: { Arc , Mutex , Once } ;
20
20
use std:: thread;
21
- use std:: usize;
22
21
23
22
/// Thread builder used for customization via
24
23
/// [`ThreadPoolBuilder::spawn_handler`](struct.ThreadPoolBuilder.html#method.spawn_handler).
@@ -599,10 +598,7 @@ impl Registry {
599
598
pub ( super ) fn increment_terminate_count ( & self ) {
600
599
let previous = self . terminate_count . fetch_add ( 1 , Ordering :: AcqRel ) ;
601
600
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" ) ;
606
602
}
607
603
608
604
/// Signals that the thread-pool which owns this registry has been
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ pub(super) struct Counters {
27
27
pub ( super ) struct JobsEventCounter ( usize ) ;
28
28
29
29
impl JobsEventCounter {
30
- pub ( super ) const DUMMY : JobsEventCounter = JobsEventCounter ( std :: usize:: MAX ) ;
30
+ pub ( super ) const DUMMY : JobsEventCounter = JobsEventCounter ( usize:: MAX ) ;
31
31
32
32
#[ inline]
33
33
pub ( super ) fn as_usize ( self ) -> usize {
Original file line number Diff line number Diff line change @@ -8,7 +8,6 @@ use crossbeam_utils::CachePadded;
8
8
use std:: sync:: atomic:: Ordering ;
9
9
use std:: sync:: { Condvar , Mutex } ;
10
10
use std:: thread;
11
- use std:: usize;
12
11
13
12
mod counters;
14
13
pub ( crate ) use self :: counters:: THREADS_MAX ;
You can’t perform that action at this time.
0 commit comments