From ef1484c713e1340d842cc7b76f79dc976afe891f Mon Sep 17 00:00:00 2001 From: Spenser Black Date: Sun, 15 Dec 2024 09:39:40 -0500 Subject: [PATCH] 2.2.0 (#186) * Update to 2.2.0 * Resolve clippy warnings Warnings added in a later version of clippy. --- Cargo.toml | 2 +- src/color.rs | 2 +- src/lib.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) 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()),