From b501f5152645faaf0d99aa2daf44765d976c8485 Mon Sep 17 00:00:00 2001 From: faysou Date: Mon, 23 Nov 2026 12:01:20 +0000 Subject: [PATCH] test(run): compile the output counting reader only on Unix (#5407) The Windows Clippy job fails because the test reader `Counted` is compiled on Windows, where its only caller is excluded. The flooding-process test uses `awk` and already requires Unix. Apply the same condition to the reader and its `Read` implementation. The cross-platform queue shutdown test keeps its own reader. Co-authored-by: faysou <893862+faysou@users.noreply.github.com> --- crates/ide-run/src/process.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crates/ide-run/src/process.rs b/crates/ide-run/src/process.rs index 773c3aa55..b067bb03a 100644 --- a/crates/ide-run/src/process.rs +++ b/crates/ide-run/src/process.rs @@ -1587,11 +1587,13 @@ mod tests { } /// A pipe stand-in that counts the bytes taken from it. + #[cfg(unix)] struct Counted { inner: R, taken: Arc, } + #[cfg(unix)] impl Read for Counted { fn read(&mut self, buf: &mut [u8]) -> std::io::Result { let n = self.inner.read(buf)?;