From 57bbcdbaef72b5dca67c5ca996979dd25613e1b7 Mon Sep 17 00:00:00 2001 From: lucaronin Date: Thu, 23 Apr 2026 23:49:00 +0200 Subject: [PATCH] fix: format cache hardening helpers --- src-tauri/src/vault/cache.rs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src-tauri/src/vault/cache.rs b/src-tauri/src/vault/cache.rs index 1c7b1b96..c2657f04 100644 --- a/src-tauri/src/vault/cache.rs +++ b/src-tauri/src/vault/cache.rs @@ -230,7 +230,11 @@ fn read_cache_bytes(path: &Path) -> Result>, String> { match fs::read(path) { Ok(bytes) => Ok(Some(bytes)), Err(error) if error.kind() == ErrorKind::NotFound => Ok(None), - Err(error) => Err(format!("Failed to read cache {}: {}", path.display(), error)), + Err(error) => Err(format!( + "Failed to read cache {}: {}", + path.display(), + error + )), } } @@ -319,10 +323,7 @@ fn remove_stale_cache_write_lock(lock_path: &Path) -> Result { return Ok(false); } - log::warn!( - "Removing stale cache write lock {}", - lock_path.display() - ); + log::warn!("Removing stale cache write lock {}", lock_path.display()); match fs::remove_file(lock_path) { Ok(()) => Ok(true), Err(error) if error.kind() == ErrorKind::NotFound => Ok(true),