Skip to content

Commit cdcea04

Browse files
Adronclaude
andcommitted
fix(linux): allow dead credentials_ready_tx field without gtk feature
Linux CI clippy (-D warnings) failed on dead_code: TrayShared.credentials_ready_tx is read only from the GTK sign-in callback, but is constructed unconditionally, so a non-gtk build (what CI compiles) leaves it write-only. This is the intended behavior — without the gtk feature there is no GUI sign-in and the daemon relies on its secret-store poll — so gate the field with #[cfg_attr(not(feature = "gtk"), allow(dead_code))]. macOS clippy never caught it because linux.rs is cfg(target_os="linux"). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 1676d8b commit cdcea04

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

  • linux-ubuntu/crates/tray-app/src

linux-ubuntu/crates/tray-app/src/linux.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,11 @@ struct TrayShared {
6565
/// True when the user has paused sync manually.
6666
paused: bool,
6767
/// Fires when sign-in succeeds; the daemon listens on the other end.
68+
/// Only read from the GTK sign-in callback (`open_signin`). Without the
69+
/// `gtk` feature there is no GUI sign-in, so the daemon relies solely on
70+
/// its secret-store poll and this sender is intentionally never fired —
71+
/// allow the resulting dead field in that build configuration.
72+
#[cfg_attr(not(feature = "gtk"), allow(dead_code))]
6873
credentials_ready_tx: Option<tokio::sync::oneshot::Sender<()>>,
6974
}
7075

0 commit comments

Comments
 (0)