From fc537c14c49de52ac5f9a016089b41e7a8b32f53 Mon Sep 17 00:00:00 2001 From: Yann Dirson Date: Fri, 5 Apr 2024 15:58:35 +0200 Subject: [PATCH] feat: implement `IntoView` for `Rc` (#2462) With-help-from: Greg Johnston Signed-off-by: Yann Dirson --- leptos_dom/src/lib.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/leptos_dom/src/lib.rs b/leptos_dom/src/lib.rs index 2925940174..82360522bc 100644 --- a/leptos_dom/src/lib.rs +++ b/leptos_dom/src/lib.rs @@ -1182,6 +1182,17 @@ impl IntoView for Cow<'static, str> { } } +impl IntoView for Rc { + #[cfg_attr( + any(debug_assertions, feature = "ssr"), + instrument(level = "trace", name = "#text", skip_all) + )] + #[inline(always)] + fn into_view(self) -> View { + View::Text(Text::new(self.into())) + } +} + impl IntoView for Oco<'static, str> { #[cfg_attr( any(debug_assertions, feature = "ssr"),