mirror of
https://github.com/rust-embedded/heapless.git
synced 2025-09-27 12:30:35 +00:00
fix warnings
This commit is contained in:
parent
e4580da8a8
commit
596a1f03f1
@ -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;
|
||||
|
@ -7,7 +7,7 @@ use core::{
|
||||
cell::UnsafeCell,
|
||||
convert::TryFrom,
|
||||
marker::PhantomData,
|
||||
mem::{self, MaybeUninit},
|
||||
mem,
|
||||
num::NonZeroUsize,
|
||||
ptr::NonNull,
|
||||
sync::atomic::{AtomicUsize, Ordering},
|
||||
|
@ -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>,
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user