Skip to content

Commit

Permalink
feat: implement IntoView for Rc<str> (#2462)
Browse files Browse the repository at this point in the history
With-help-from: Greg Johnston <[email protected]>
Signed-off-by: Yann Dirson <[email protected]>
  • Loading branch information
ydirson authored Apr 5, 2024
1 parent 15f8bdd commit fc537c1
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions leptos_dom/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1182,6 +1182,17 @@ impl IntoView for Cow<'static, str> {
}
}

impl IntoView for Rc<str> {
#[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"),
Expand Down

0 comments on commit fc537c1

Please sign in to comment.