From a09e3eaa683df6c4f46e6a81d4bb0682ef2b8e9e Mon Sep 17 00:00:00 2001 From: Echo Date: Sun, 17 May 2026 15:21:52 +0000 Subject: [PATCH] fix: add truncate(true) to lock file OpenOptions for clippy compliance Resolves clippy::suspicious_open_options warning on whitelist lock file creation. --- src/auth/whitelist.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/auth/whitelist.rs b/src/auth/whitelist.rs index 2e31a65..15fce85 100644 --- a/src/auth/whitelist.rs +++ b/src/auth/whitelist.rs @@ -138,6 +138,7 @@ impl WhitelistManager { let lock_path = format!("{}.lock", self.config_path); let lock_file = OpenOptions::new() .create(true) + .truncate(true) .write(true) .open(&lock_path) .with_context(|| format!("Failed to create lock file: {}", lock_path))?;