diff options
| author | JJ Liebig <jonathan.liebig@gmail.com> | 2026-09-11 20:12:49 +0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-09-11 18:12:49 +0200 |
| commit | c7a7cc454ac116467ce48365e075eb8ce53e458c (patch) | |
| tree | 2c31da71c3530cd129d140beac2d680b26c12800 /src/pane.rs | |
| parent | 871ff8b91f969a0d6d7fcd21ad028723a77bac6c (diff) | |
fix: lint all targets on windows (#3963)
Native Windows lint and check only clippy-checked the herdr binary, while macOS and Linux run clippy across all targets. Enable --all-targets on Windows and gate the Unix-only test helpers that this exposed so Windows check matches the Unix one.
Diffstat (limited to 'src/pane.rs')
| -rw-r--r-- | src/pane.rs | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/src/pane.rs b/src/pane.rs index 43f71e39..0ba411d0 100644 --- a/src/pane.rs +++ b/src/pane.rs @@ -40,7 +40,7 @@ use self::agent_detection::{ DetectionScreenReadInput, PendingIdleConfirmation, ScreenDetectionPublishInput, AGENT_PENDING_IDLE_RECHECK, AGENT_STARTUP_GRACE_WINDOW, }; -#[cfg(any(unix, test))] +#[cfg(unix)] pub use self::terminal::InputState; use self::terminal::{GhosttyPaneTerminal, PaneTerminal}; pub(crate) use self::terminal::{ @@ -1075,7 +1075,7 @@ impl TerminalCompressionWake { /// Drives libghostty-vt's caller-owned compression after terminal activity settles. struct TerminalCompressionTask { wake: TerminalCompressionWake, - #[cfg(test)] + #[cfg(all(test, any(target_os = "linux", target_os = "macos")))] completed_passes: Arc<AtomicU64>, handle: tokio::task::AbortHandle, } @@ -1094,9 +1094,9 @@ impl TerminalCompressionTask { }; let task_notify = wake.notify.clone(); let task_generation = wake.generation.clone(); - #[cfg(test)] + #[cfg(all(test, any(target_os = "linux", target_os = "macos")))] let completed_passes = Arc::new(AtomicU64::new(0)); - #[cfg(test)] + #[cfg(all(test, any(target_os = "linux", target_os = "macos")))] let task_completed_passes = completed_passes.clone(); let handle = tokio::spawn(async move { run_terminal_compression_task( @@ -1104,7 +1104,7 @@ impl TerminalCompressionTask { terminal, task_notify, task_generation, - #[cfg(test)] + #[cfg(all(test, any(target_os = "linux", target_os = "macos")))] task_completed_passes, ) .await; @@ -1112,7 +1112,7 @@ impl TerminalCompressionTask { .abort_handle(); Self { wake, - #[cfg(test)] + #[cfg(all(test, any(target_os = "linux", target_os = "macos")))] completed_passes, handle, } @@ -1130,7 +1130,7 @@ impl TerminalCompressionTask { self.handle.abort(); } - #[cfg(test)] + #[cfg(all(test, any(target_os = "linux", target_os = "macos")))] fn completed_passes(&self) -> u64 { self.completed_passes.load(Ordering::Acquire) } @@ -1141,7 +1141,9 @@ async fn run_terminal_compression_task( terminal: Arc<PaneTerminal>, notify: Arc<Notify>, generation: Arc<AtomicU64>, - #[cfg(test)] completed_passes: Arc<AtomicU64>, + #[cfg(all(test, any(target_os = "linux", target_os = "macos")))] completed_passes: Arc< + AtomicU64, + >, ) { let mut observed_generation = generation.load(Ordering::Acquire); let mut activity = loop { @@ -1224,7 +1226,7 @@ async fn run_terminal_compression_task( TerminalCompressionStep::Compressed( crate::ghostty::TerminalCompressionResult::Complete, ) => { - #[cfg(test)] + #[cfg(all(test, any(target_os = "linux", target_os = "macos")))] completed_passes.fetch_add(1, Ordering::Release); loop { notify.notified().await; @@ -2979,7 +2981,7 @@ impl PaneRuntime { result } - #[cfg(any(unix, test))] + #[cfg(unix)] pub fn input_state(&self) -> Option<InputState> { self.terminal.input_state() } |
