mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-05-18 10:58:52 +08:00
fix: gate parse_gemini_keychain_json with cfg(target_os = "macos")
The function is only called from read_gemini_credentials_from_keychain which is already macOS-only. Without the gate, non-macOS CI fails with dead-code error due to -D warnings.
This commit is contained in:
@@ -778,6 +778,7 @@ fn read_gemini_credentials_from_keychain() -> Option<GeminiCredentials> {
|
||||
/// ```json
|
||||
/// { "token": { "accessToken": "...", "refreshToken": "...", "expiresAt": 1234 }, "updatedAt": ... }
|
||||
/// ```
|
||||
#[cfg(target_os = "macos")]
|
||||
fn parse_gemini_keychain_json(content: &str) -> GeminiCredentials {
|
||||
let parsed: serde_json::Value = match serde_json::from_str(content) {
|
||||
Ok(v) => v,
|
||||
|
||||
Reference in New Issue
Block a user