From 72890fcbee6d772c4202d5c81b1eb26b15c7f3c1 Mon Sep 17 00:00:00 2001 From: Lucas Colombo Date: Sun, 31 Mar 2024 01:38:13 -0300 Subject: [PATCH] =?UTF-8?q?style:=20=F0=9F=92=84=20linting?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Taskfile.yaml | 2 +- lib/cli/stylize/style.rs | 2 +- lib/cli/stylize/stylizer.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Taskfile.yaml b/Taskfile.yaml index c265afa..83034bf 100644 --- a/Taskfile.yaml +++ b/Taskfile.yaml @@ -27,7 +27,7 @@ tasks: lint: desc: 🧶 lint lool cmds: - - cargo clippy --fix + - cargo clippy --fix --all-features test: desc: 🧪 test lool diff --git a/lib/cli/stylize/style.rs b/lib/cli/stylize/style.rs index 71410b9..bc0524d 100644 --- a/lib/cli/stylize/style.rs +++ b/lib/cli/stylize/style.rs @@ -86,7 +86,7 @@ impl Color { "bright-magenta" => Some(Color::BrightMagenta), "bright-cyan" => Some(Color::BrightCyan), "bright-white" => Some(Color::BrightWhite), - s if s.starts_with("#") => { + s if s.starts_with('#') => { let s = &s[1..]; let r = u8::from_str_radix(&s[0..2], 16).context("Error parsing RGB color")?; let g = u8::from_str_radix(&s[2..4], 16).context("Error parsing RGB color")?; diff --git a/lib/cli/stylize/stylizer.rs b/lib/cli/stylize/stylizer.rs index 225d50b..e717c20 100644 --- a/lib/cli/stylize/stylizer.rs +++ b/lib/cli/stylize/stylizer.rs @@ -29,7 +29,7 @@ pub mod instructions { pub fn parse(instructions: &str) -> Result { let mut styled_string = StyledString::default(); - if instructions.starts_with("+") { + if instructions.starts_with('+') { // only attributes styled_string.attrs = attributes_from_str(instructions.trim_start_matches('+')) .map_err(|e| eyre::eyre!(e))?;