diff --git a/crates/wasmtime/src/ref.rs b/crates/wasmtime/src/ref.rs index 358cc0451c..b8bd3693e5 100644 --- a/crates/wasmtime/src/ref.rs +++ b/crates/wasmtime/src/ref.rs @@ -74,9 +74,10 @@ impl ExternRef { impl fmt::Debug for ExternRef { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { let ExternRef { inner, store: _ } = self; + let store = self.store(); f.debug_struct("ExternRef") .field("inner", &inner) - .field("store", &"..") + .field("store", &store) .finish() } } diff --git a/crates/wasmtime/src/runtime.rs b/crates/wasmtime/src/runtime.rs index c2e62dcf5c..bf3a01d1f0 100644 --- a/crates/wasmtime/src/runtime.rs +++ b/crates/wasmtime/src/runtime.rs @@ -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 { fn drop(&mut self) { for instance in self.instances.get_mut().iter() {