fix warnings

This commit is contained in:
Jorge Aparicio 2020-05-03 16:09:56 +02:00 committed by Emil Fresk
parent e4580da8a8
commit 596a1f03f1
4 changed files with 7 additions and 8 deletions

View File

@ -73,8 +73,7 @@
#![deny(missing_docs)]
#![deny(rust_2018_compatibility)]
#![deny(rust_2018_idioms)]
// #![deny(warnings)]
#![allow(warnings)] // FIXME
#![deny(warnings)]
pub use binary_heap::BinaryHeap;
pub use generic_array::typenum::consts;

View File

@ -7,7 +7,7 @@ use core::{
cell::UnsafeCell,
convert::TryFrom,
marker::PhantomData,
mem::{self, MaybeUninit},
mem,
num::NonZeroUsize,
ptr::NonNull,
sync::atomic::{AtomicUsize, Ordering},

View File

@ -4,9 +4,11 @@ pub use core::ptr::NonNull as Ptr;
use core::{
cell::UnsafeCell,
ptr,
sync::atomic::{self, AtomicPtr, Ordering},
sync::atomic::{AtomicPtr, Ordering},
};
/// Unfortunate implementation detail required to use the
/// [`Pool.grow_exact`](struct.Pool.html#method.grow_exact) method
pub struct Node<T> {
next: AtomicPtr<Node<T>>,
pub(crate) data: UnsafeCell<T>,

View File

@ -224,16 +224,14 @@
//!
//! 4. "Hazard pointers: Safe memory reclamation for lock-free objects." Michael, Maged M.
use core::{any::TypeId, mem, sync::atomic::Ordering};
use core::{any::TypeId, mem};
use core::{
cell::UnsafeCell,
cmp, fmt,
hash::{Hash, Hasher},
marker::PhantomData,
mem::MaybeUninit,
ops::{Deref, DerefMut},
ptr,
sync::atomic::AtomicPtr,
};
use as_slice::{AsMutSlice, AsSlice};
@ -394,7 +392,7 @@ impl<T> Pool<T> {
}
#[cfg(not(target_arch = "x86_64"))]
() => self.stack.push(NonNull::from(p)),
() => self.stack.push(core::ptr::NonNull::from(p)),
}
}
cap