From: Emilie Burgun Date: Fri, 7 Feb 2025 13:35:27 +0000 (+0100) Subject: [fixup] return that reading from a null stream wrote 0 bytes to the buffer X-Git-Tag: v0.10.0~49^2^2~1 X-Git-Url: https://git.sagredo.dev/?a=commitdiff_plain;h=8966e175f1a60b594bbc21752838f66920db75cf;p=scryer-prolog.git [fixup] return that reading from a null stream wrote 0 bytes to the buffer --- 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,