fix subscriptions in events
This commit is contained in:
1 parent
07ed3e67dd
commit
a6f611eccf
12 files changed
+445
-103
No files matched your search
@@ -14,4 +14,4 @@ rand = "0.8.5"
|
||||
|
||||
[features]
|
||||
default = ["check_generation"]
|
||||
check_generation = []
|
||||
check_generation = []
|
||||
@@ -193,6 +193,17 @@ impl<T: 'static> CopyHandle<T> {
|
||||
pub fn write(&self) -> RefMut<'_, T> {
|
||||
self.try_write().unwrap()
|
||||
}
|
||||
|
||||
pub fn ptr_eq(&self, other: &Self) -> bool {
|
||||
#[cfg(any(debug_assertions, feature = "check_generation"))]
|
||||
{
|
||||
self.raw.data.as_ptr() == other.raw.data.as_ptr() && self.generation == other.generation
|
||||
}
|
||||
#[cfg(not(any(debug_assertions, feature = "check_generation")))]
|
||||
{
|
||||
self.raw.data.as_ptr() == other.raw.data.as_ptr()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<T> Copy for CopyHandle<T> {}
|
||||
|
||||
Reference in new issue
Block a user