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 <[email protected]>
Цей коміт міститься в:
faysouтаfaysou authored and GitHub committed 2026-11-23 20:01:20 +08:00
1 джерело 50cd478773
коміт b501f51526
1 file changed
+2
+2
Переглянути файл
@@ -1587,11 +1587,13 @@ mod tests {
}
/// A pipe stand-in that counts the bytes taken from it.
#[cfg(unix)]
struct Counted<R> {
inner: R,
taken: Arc<AtomicUsize>,
}
#[cfg(unix)]
impl<R: Read> Read for Counted<R> {
fn read(&mut self, buf: &mut [u8]) -> std::io::Result<usize> {
let n = self.inner.read(buf)?;