diff --git a/packages/yew-agent/src/oneshot/provider.rs b/packages/yew-agent/src/oneshot/provider.rs index e91f4ef584c..b56516669ef 100644 --- a/packages/yew-agent/src/oneshot/provider.rs +++ b/packages/yew-agent/src/oneshot/provider.rs @@ -1,4 +1,5 @@ use core::fmt; +use std::any::type_name; use std::cell::RefCell; use std::rc::Rc; @@ -25,7 +26,7 @@ where T: Oneshot, { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.write_str("OneshotProviderState<_>") + f.write_str(type_name::()) } } diff --git a/packages/yew-agent/src/reactor/hooks.rs b/packages/yew-agent/src/reactor/hooks.rs index 076e7067957..975c11abb24 100644 --- a/packages/yew-agent/src/reactor/hooks.rs +++ b/packages/yew-agent/src/reactor/hooks.rs @@ -1,3 +1,4 @@ +use std::any::type_name; use std::fmt; use std::ops::Deref; use std::rc::Rc; @@ -55,7 +56,7 @@ where ::Input: fmt::Debug, { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.debug_struct("UseReactorBridgeHandle<_>") + f.debug_struct(type_name::()) .field("inner", &self.tx) .finish() } @@ -214,7 +215,7 @@ where ::Output: fmt::Debug, { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.debug_struct("UseReactorSubscriptionHandle<_>") + f.debug_struct(type_name::()) .field("bridge", &self.bridge) .field("outputs", &self.outputs) .finish() diff --git a/packages/yew-agent/src/reactor/provider.rs b/packages/yew-agent/src/reactor/provider.rs index 6367ba0d845..03ec9008ac2 100644 --- a/packages/yew-agent/src/reactor/provider.rs +++ b/packages/yew-agent/src/reactor/provider.rs @@ -1,3 +1,4 @@ +use std::any::type_name; use std::cell::RefCell; use std::fmt; use std::rc::Rc; @@ -26,7 +27,7 @@ where T: Reactor, { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.write_str("ReactorProviderState<_>") + f.write_str(type_name::()) } } diff --git a/packages/yew-agent/src/scope_ext.rs b/packages/yew-agent/src/scope_ext.rs index 705ee1e15ee..6120062f9c6 100644 --- a/packages/yew-agent/src/scope_ext.rs +++ b/packages/yew-agent/src/scope_ext.rs @@ -1,5 +1,6 @@ //! This module contains extensions to the component scope for agent access. +use std::any::type_name; use std::fmt; use std::rc::Rc; @@ -50,8 +51,7 @@ where R: Reactor + 'static, { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.debug_struct("ReactorBridgeHandle<_>") - .finish_non_exhaustive() + f.debug_struct(type_name::()).finish_non_exhaustive() } } diff --git a/packages/yew-agent/src/worker/hooks.rs b/packages/yew-agent/src/worker/hooks.rs index d6a43c4d1d3..19745e64dfd 100644 --- a/packages/yew-agent/src/worker/hooks.rs +++ b/packages/yew-agent/src/worker/hooks.rs @@ -1,3 +1,4 @@ +use std::any::type_name; use std::fmt; use std::ops::Deref; use std::rc::Rc; @@ -52,7 +53,7 @@ where T: Worker, { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.debug_struct("UseWorkerBridgeHandle<_>") + f.debug_struct(type_name::()) .field("inner", &self.inner) .finish() } @@ -157,7 +158,7 @@ where T::Output: fmt::Debug, { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.debug_struct("UseWorkerSubscriptionHandle<_>") + f.debug_struct(type_name::()) .field("bridge", &self.bridge) .field("outputs", &self.outputs) .finish() diff --git a/packages/yew-agent/src/worker/provider.rs b/packages/yew-agent/src/worker/provider.rs index bd2393fe346..b452729d027 100644 --- a/packages/yew-agent/src/worker/provider.rs +++ b/packages/yew-agent/src/worker/provider.rs @@ -1,3 +1,4 @@ +use std::any::type_name; use std::cell::RefCell; use std::fmt; use std::rc::Rc; @@ -53,7 +54,7 @@ where W: Worker, { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.write_str("WorkerProviderState<_>") + f.write_str(type_name::()) } }