feat: implement IntoView for Rc<str> (#2462)

With-help-from: Greg Johnston <greg.johnston@gmail.com>
Signed-off-by: Yann Dirson <ydirson@free.fr>
This commit is contained in:
Yann Dirson 2024-04-05 15:58:35 +02:00 committed by GitHub
parent 15f8bdd4dc
commit fc537c14c4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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> { impl IntoView for Oco<'static, str> {
#[cfg_attr( #[cfg_attr(
any(debug_assertions, feature = "ssr"), any(debug_assertions, feature = "ssr"),