feat(Text): Add a From<Cow<str>> impl for Text

pull/477/head
Andrew Chin 3 years ago committed by Florian Dehau
parent 975c4165d0
commit 703e41cd49

@ -398,6 +398,12 @@ impl<'a> From<&'a str> for Text<'a> {
}
}
impl<'a> From<Cow<'a, str>> for Text<'a> {
fn from(s: Cow<'a, str>) -> Text<'a> {
Text::raw(s)
}
}
impl<'a> From<Span<'a>> for Text<'a> {
fn from(span: Span<'a>) -> Text<'a> {
Text {

Loading…
Cancel
Save