From 62aee1fa65f130b5a62f64c595e25e52d6293623 Mon Sep 17 00:00:00 2001 From: Ajeet D'Souza <98ajeet@gmail.com> Date: Mon, 10 Feb 2025 01:44:52 +0530 Subject: [PATCH] Clippy lints --- src/config.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/config.rs b/src/config.rs index 4b46a78..0aeda5c 100644 --- a/src/config.rs +++ b/src/config.rs @@ -2,7 +2,7 @@ use std::env; use std::ffi::OsString; use std::path::PathBuf; -use anyhow::{ensure, Context, Result}; +use anyhow::{Context, Result, ensure}; use glob::Pattern; use crate::db::Rank; @@ -20,7 +20,7 @@ pub fn data_dir() -> Result { } pub fn echo() -> bool { - env::var_os("_ZO_ECHO").map_or(false, |var| var == "1") + env::var_os("_ZO_ECHO").is_some_and(|var| var == "1") } pub fn exclude_dirs() -> Result> { @@ -58,5 +58,5 @@ pub fn maxage() -> Result { } pub fn resolve_symlinks() -> bool { - env::var_os("_ZO_RESOLVE_SYMLINKS").map_or(false, |var| var == "1") + env::var_os("_ZO_RESOLVE_SYMLINKS").is_some_and(|var| var == "1") }