refactor: clean up a few things

I've decided to keep lazy_static for now as std::sync::LazyLock seems to
have a slightly bigger impact on binary size.
This commit is contained in:
ErrorNoInternet 2025-04-15 03:19:53 -04:00
commit c139026704
No known key found for this signature in database
GPG key ID: 2486BFB7B1E6A4A3
5 changed files with 16 additions and 17 deletions

View file

@ -12,8 +12,8 @@ pub struct Colors {
impl Colors {
const fn new(is_no_color: bool) -> Self {
match is_no_color {
true => Self {
if is_no_color {
Self {
reset: "",
blue: "",
cyan: "",
@ -21,8 +21,9 @@ impl Colors {
yellow: "",
red: "",
magenta: "",
},
false => Self {
}
} else {
Self {
reset: "\x1b[0m",
blue: "\x1b[34m",
cyan: "\x1b[36m",
@ -30,7 +31,7 @@ impl Colors {
yellow: "\x1b[33m",
red: "\x1b[31m",
magenta: "\x1b[35m",
},
}
}
}
}