Skip to content

Commit 596a1f0

Browse files
japarickorken89
authored andcommitted
fix warnings
1 parent e4580da commit 596a1f0

File tree

4 files changed

+7
-8
lines changed

4 files changed

+7
-8
lines changed

src/lib.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,7 @@
7373
#![deny(missing_docs)]
7474
#![deny(rust_2018_compatibility)]
7575
#![deny(rust_2018_idioms)]
76-
// #![deny(warnings)]
77-
#![allow(warnings)] // FIXME
76+
#![deny(warnings)]
7877

7978
pub use binary_heap::BinaryHeap;
8079
pub use generic_array::typenum::consts;

src/pool/cas.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use core::{
77
cell::UnsafeCell,
88
convert::TryFrom,
99
marker::PhantomData,
10-
mem::{self, MaybeUninit},
10+
mem,
1111
num::NonZeroUsize,
1212
ptr::NonNull,
1313
sync::atomic::{AtomicUsize, Ordering},

src/pool/llsc.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@ pub use core::ptr::NonNull as Ptr;
44
use core::{
55
cell::UnsafeCell,
66
ptr,
7-
sync::atomic::{self, AtomicPtr, Ordering},
7+
sync::atomic::{AtomicPtr, Ordering},
88
};
99

10+
/// Unfortunate implementation detail required to use the
11+
/// [`Pool.grow_exact`](struct.Pool.html#method.grow_exact) method
1012
pub struct Node<T> {
1113
next: AtomicPtr<Node<T>>,
1214
pub(crate) data: UnsafeCell<T>,

src/pool/mod.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -224,16 +224,14 @@
224224
//!
225225
//! 4. "Hazard pointers: Safe memory reclamation for lock-free objects." Michael, Maged M.
226226
227-
use core::{any::TypeId, mem, sync::atomic::Ordering};
227+
use core::{any::TypeId, mem};
228228
use core::{
229-
cell::UnsafeCell,
230229
cmp, fmt,
231230
hash::{Hash, Hasher},
232231
marker::PhantomData,
233232
mem::MaybeUninit,
234233
ops::{Deref, DerefMut},
235234
ptr,
236-
sync::atomic::AtomicPtr,
237235
};
238236

239237
use as_slice::{AsMutSlice, AsSlice};
@@ -394,7 +392,7 @@ impl<T> Pool<T> {
394392
}
395393

396394
#[cfg(not(target_arch = "x86_64"))]
397-
() => self.stack.push(NonNull::from(p)),
395+
() => self.stack.push(core::ptr::NonNull::from(p)),
398396
}
399397
}
400398
cap

0 commit comments

Comments
 (0)