diff --git a/Cargo.toml b/Cargo.toml index cfbbfd1..9d6c6c1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "colored" description = "The most simple way to add colors in your terminal" -version = "2.1.0" +version = "2.2.0" edition = "2021" authors = ["Thomas Wickham "] license = "MPL-2.0" diff --git a/src/color.rs b/src/color.rs index 40f583a..3406ad0 100644 --- a/src/color.rs +++ b/src/color.rs @@ -199,7 +199,7 @@ impl Color { } } -impl<'a> From<&'a str> for Color { +impl From<&str> for Color { fn from(src: &str) -> Self { src.parse().unwrap_or(Color::White) } diff --git a/src/lib.rs b/src/lib.rs index a43962e..116b9af 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -655,7 +655,7 @@ impl Colorize for ColoredString { } } -impl<'a> Colorize for &'a str { +impl Colorize for &str { fn color>(self, color: S) -> ColoredString { ColoredString { fgcolor: Some(color.into()),