diff options
Diffstat (limited to 'helix-tui')
-rw-r--r-- | helix-tui/src/text.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/helix-tui/src/text.rs b/helix-tui/src/text.rs index b4278c86..602090e5 100644 --- a/helix-tui/src/text.rs +++ b/helix-tui/src/text.rs @@ -402,6 +402,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 { |