mirror of
https://github.com/DioxusLabs/dioxus
synced 2024-11-10 14:44:12 +00:00
fix gen box compile release no features
This commit is contained in:
parent
84e76dbdce
commit
9633cfadde
2 changed files with 3 additions and 4 deletions
|
@ -2,7 +2,6 @@
|
||||||
#![warn(missing_docs)]
|
#![warn(missing_docs)]
|
||||||
|
|
||||||
use parking_lot::Mutex;
|
use parking_lot::Mutex;
|
||||||
use std::sync::atomic::AtomicU32;
|
|
||||||
use std::{
|
use std::{
|
||||||
fmt::Debug,
|
fmt::Debug,
|
||||||
marker::PhantomData,
|
marker::PhantomData,
|
||||||
|
@ -61,7 +60,7 @@ impl<T: 'static, S: AnyStorage> Debug for GenerationalBox<T, S> {
|
||||||
self.generation
|
self.generation
|
||||||
))?;
|
))?;
|
||||||
#[cfg(not(any(debug_assertions, feature = "check_generation")))]
|
#[cfg(not(any(debug_assertions, feature = "check_generation")))]
|
||||||
f.write_fmt(format_args!("{:?}", self.raw.0.data.as_ptr()))?;
|
f.write_fmt(format_args!("{:?}", self.raw.0.data.data_ptr()))?;
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -183,7 +182,7 @@ impl<T: 'static, S: Storage<T>> GenerationalBox<T, S> {
|
||||||
}
|
}
|
||||||
#[cfg(not(any(debug_assertions, feature = "check_generation")))]
|
#[cfg(not(any(debug_assertions, feature = "check_generation")))]
|
||||||
{
|
{
|
||||||
self.raw.data.as_ptr() == other.raw.data.as_ptr()
|
self.raw.0.data.data_ptr() == other.raw.0.data.data_ptr()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -313,7 +312,7 @@ struct MemoryLocationInner<S = UnsyncStorage> {
|
||||||
data: S,
|
data: S,
|
||||||
|
|
||||||
#[cfg(any(debug_assertions, feature = "check_generation"))]
|
#[cfg(any(debug_assertions, feature = "check_generation"))]
|
||||||
generation: AtomicU32,
|
generation: std::sync::atomic::AtomicU32,
|
||||||
|
|
||||||
#[cfg(any(debug_assertions, feature = "debug_borrows"))]
|
#[cfg(any(debug_assertions, feature = "debug_borrows"))]
|
||||||
borrow: MemoryLocationBorrowInfo,
|
borrow: MemoryLocationBorrowInfo,
|
||||||
|
|
0
packages/generational-box/src/owner.rs
Normal file
0
packages/generational-box/src/owner.rs
Normal file
Loading…
Reference in a new issue