From ff3cd10b6059f590d07945b0074f87bf6318a4a6 Mon Sep 17 00:00:00 2001 From: Matt Date: Thu, 13 Aug 2026 01:08:26 +0000 Subject: [PATCH] fix: make macOS keychain duplicate detection compile (E0521) Give the platform error a 'static trait-object lifetime so downcast_ref to security_framework::base::Error is legal; the macOS cfg block previously failed to compile on Apple targets. --- src-tauri/src/keyring.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src-tauri/src/keyring.rs b/src-tauri/src/keyring.rs index 2f6949c..a006001 100644 --- a/src-tauri/src/keyring.rs +++ b/src-tauri/src/keyring.rs @@ -156,7 +156,7 @@ pub fn describe_error(err: &keyring::Error) -> String { /// True when a platform error is the macOS `errSecDuplicateItem` code, which /// the login keychain reports when an add hits an item that already exists. -fn is_duplicate_item(err: &(dyn std::error::Error + Send + Sync)) -> bool { +fn is_duplicate_item(err: &(dyn std::error::Error + Send + Sync + 'static)) -> bool { #[cfg(target_os = "macos")] { if let Some(sec_err) = err.downcast_ref::() {