Create a simple Debug implementation for Store
This commit is contained in:
@@ -74,9 +74,10 @@ impl ExternRef {
|
|||||||
impl fmt::Debug for ExternRef {
|
impl fmt::Debug for ExternRef {
|
||||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||||
let ExternRef { inner, store: _ } = self;
|
let ExternRef { inner, store: _ } = self;
|
||||||
|
let store = self.store();
|
||||||
f.debug_struct("ExternRef")
|
f.debug_struct("ExternRef")
|
||||||
.field("inner", &inner)
|
.field("inner", &inner)
|
||||||
.field("store", &"..")
|
.field("store", &store)
|
||||||
.finish()
|
.finish()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -983,6 +983,13 @@ impl Default for Store {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl fmt::Debug for Store {
|
||||||
|
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||||
|
let inner = &*self.inner as *const StoreInner;
|
||||||
|
f.debug_struct("Store").field("inner", &inner).finish()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl Drop for StoreInner {
|
impl Drop for StoreInner {
|
||||||
fn drop(&mut self) {
|
fn drop(&mut self) {
|
||||||
for instance in self.instances.get_mut().iter() {
|
for instance in self.instances.get_mut().iter() {
|
||||||
|
|||||||
Reference in New Issue
Block a user