create tests for signals
This commit is contained in:
1 parent
b0d499036a
commit
717c09c4a3
8 files changed
+234
-5
No files matched your search
@@ -1,5 +1,6 @@
|
||||
use std::{
|
||||
cell::{Cell, Ref, RefCell, RefMut},
|
||||
fmt::Debug,
|
||||
marker::PhantomData,
|
||||
rc::Rc,
|
||||
};
|
||||
@@ -151,6 +152,20 @@ pub struct CopyHandle<T> {
|
||||
_marker: PhantomData<T>,
|
||||
}
|
||||
|
||||
impl<T: 'static> Debug for CopyHandle<T> {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
#[cfg(any(debug_assertions, feature = "check_generation"))]
|
||||
f.write_fmt(format_args!(
|
||||
"{:?}@{:?}",
|
||||
self.raw.data.as_ptr(),
|
||||
self.generation
|
||||
))?;
|
||||
#[cfg(not(any(debug_assertions, feature = "check_generation")))]
|
||||
f.write_fmt(format_args!("{:?}", self.raw.data.as_ptr()))?;
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
impl<T: 'static> CopyHandle<T> {
|
||||
#[inline(always)]
|
||||
fn validate(&self) -> bool {
|
||||
|
||||
Reference in new issue
Block a user