fix a bunch of warnings!

This commit is contained in:
Qyriad 2026-03-10 18:46:55 +01:00
parent b49032d5f4
commit b48209a33a
6 changed files with 10 additions and 84 deletions

View file

@ -2,6 +2,9 @@
//
// SPDX-License-Identifier: EUPL-1.1
// The entire point of this module.
#![allow(clippy::declare_interior_mutable_const)]
use std::{
env,
sync::{LazyLock, OnceLock},
@ -22,13 +25,7 @@ fn is_color_reqd() -> bool {
fn is_clicolor_forced() -> bool {
env::var("CLICOLOR_FORCE")
.map(|value| {
if value.is_empty() || value == "0" {
false
} else {
true
}
})
.map(|value| !(value.is_empty() || value == "0"))
.unwrap_or(false)
}