From 2838eae43e4612bf20cee940bec10d17bc46d57e Mon Sep 17 00:00:00 2001 From: Yahya Ismail Date: Fri, 10 Jul 2026 01:28:59 +0400 Subject: [PATCH] fix(keyring): declare msg mutable for cfg(windows) push_str (E0596) The #[cfg(windows)] block in EncryptedStore appends ACL-repair guidance to the read-failure context message via msg.push_str, but msg was declared immutable - a Windows-only compile error (E0596) invisible to non-Windows CI. Add mut, gated with #[cfg_attr(not(windows), allow(unused_mut))] so unix builds stay warning-free while Windows builds keep the unused_mut lint active. Co-Authored-By: Claude Fable 5 --- src/openhuman/keyring/encrypted_store.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/openhuman/keyring/encrypted_store.rs b/src/openhuman/keyring/encrypted_store.rs index 5f75a2cefd..b57be0ed24 100644 --- a/src/openhuman/keyring/encrypted_store.rs +++ b/src/openhuman/keyring/encrypted_store.rs @@ -294,7 +294,9 @@ impl SecretStore { }; let hex_key = read_result.with_context(|| { - let msg = format!( + // `mut` is only exercised inside the #[cfg(windows)] block below. + #[cfg_attr(not(windows), allow(unused_mut))] + let mut msg = format!( "Failed to read secret key file at {}", self.key_path.display() );