From 8966e175f1a60b594bbc21752838f66920db75cf Mon Sep 17 00:00:00 2001 From: Emilie Burgun Date: Fri, 7 Feb 2025 14:35:27 +0100 Subject: [PATCH] [fixup] return that reading from a null stream wrote 0 bytes to the buffer --- src/machine/streams.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/machine/streams.rs b/src/machine/streams.rs index 443c0183..253bd47e 100644 --- a/src/machine/streams.rs +++ b/src/machine/streams.rs @@ -836,7 +836,7 @@ impl Read for Stream { ErrorKind::PermissionDenied, StreamError::ReadFromOutputStream, )), - Stream::Null(_) => Ok(buf.len()), + Stream::Null(_) => Ok(0), Stream::OutputFile(_) | Stream::StandardError(_) | Stream::StandardOutput(_) => { Err(std::io::Error::new( ErrorKind::PermissionDenied, -- 2.54.0