From 9dedd71451fe8187ce2573baddc6bb20c2ee881f Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Mon, 23 Mar 2020 15:24:21 +0100 Subject: Fix: Return actual length of buffer The function has to return the number of bytes in the buffer, so return the length of the buffer here. Still, the contents are ignored and not written to any destination. Signed-off-by: Matthias Beyer --- lib/core/libimagrt/src/io.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/core/libimagrt/src/io.rs b/lib/core/libimagrt/src/io.rs index 31f928c2..9bcef6a9 100644 --- a/lib/core/libimagrt/src/io.rs +++ b/lib/core/libimagrt/src/io.rs @@ -86,7 +86,7 @@ impl<'a> Write for LockedOutputProxy<'a> { match *self { LockedOutputProxy::Out(ref mut r) => r.write(buf), LockedOutputProxy::Err(ref mut r) => r.write(buf), - LockedOutputProxy::Sink => Ok(0), + LockedOutputProxy::Sink => Ok(buf.len()), } } -- cgit v1.2.3