From ec8b521dee416e45c1c17594f79011bc044cda2c Mon Sep 17 00:00:00 2001 From: Chawye Hsu Date: Sat, 23 Mar 2024 22:16:12 +0800 Subject: [PATCH] clippy fix Signed-off-by: Chawye Hsu --- src/config.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/config.rs b/src/config.rs index 4669c5066..8199c5944 100644 --- a/src/config.rs +++ b/src/config.rs @@ -73,8 +73,7 @@ pub fn get_cache_dir() -> miette::Result { // Only use the xdg cache pixi directory when it exists xdg_cache_pixi_dir - .map(|d| d.exists().then_some(d)) - .flatten() + .and_then(|d| d.exists().then_some(d)) .ok_or_else(|| miette::miette!("could not determine xdg cache directory")) }) .or_else(|_| {