fix a bunch of warnings!
This commit is contained in:
parent
b49032d5f4
commit
b48209a33a
6 changed files with 10 additions and 84 deletions
11
src/color.rs
11
src/color.rs
|
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue