]> Repositorios git - scryer-prolog.git/commitdiff
[fixup] return that reading from a null stream wrote 0 bytes to the buffer
authorEmilie Burgun <[email protected]>
Fri, 7 Feb 2025 13:35:27 +0000 (14:35 +0100)
committerEmilie Burgun <[email protected]>
Fri, 7 Feb 2025 13:35:27 +0000 (14:35 +0100)
src/machine/streams.rs

index 443c018303498a4477b0f775699854a6061a0902..253bd47ea7762383692b9b6474dcd0e9bb715f4d 100644 (file)
@@ -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,