add impl IntoStyle for Style (#2682)

This commit is contained in:
Dreo 2024-07-12 18:13:29 +03:00 committed by GitHub
parent b3db094618
commit 3d37f08539
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -46,6 +46,16 @@ pub trait IntoStyle {
fn into_style_boxed(self: Box<Self>) -> Style;
}
impl IntoStyle for Style {
fn into_style(self) -> Style {
self
}
fn into_style_boxed(self: Box<Self>) -> Style {
*self
}
}
impl IntoStyle for &'static str {
#[inline(always)]
fn into_style(self) -> Style {