style: 💄 linting
This commit is contained in:
parent
081d16b5c9
commit
72890fcbee
@ -27,7 +27,7 @@ tasks:
|
||||
lint:
|
||||
desc: 🧶 lint lool
|
||||
cmds:
|
||||
- cargo clippy --fix
|
||||
- cargo clippy --fix --all-features
|
||||
|
||||
test:
|
||||
desc: 🧪 test lool
|
||||
|
||||
@ -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")?;
|
||||
|
||||
@ -29,7 +29,7 @@ pub mod instructions {
|
||||
pub fn parse(instructions: &str) -> Result<StyledString> {
|
||||
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))?;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user