diff --git a/src/lib.rs b/src/lib.rs index 71e042b..54b234f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -479,6 +479,15 @@ impl Deref for ColoredString { } } +impl From for ColoredString { + fn from(s: String) -> Self { + ColoredString { + input: s, + ..ColoredString::default() + } + } +} + impl<'a> From<&'a str> for ColoredString { fn from(s: &'a str) -> Self { ColoredString {