mirror of
https://github.com/l0ng-ai/openidea.git
synced 2026-11-24 08:03:19 +00:00
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>
This commit is contained in:
@@ -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)?;
|
||||
|
||||
Reference in New Issue
Block a user