~matthiasbeyer/imag

9dedd71451fe8187ce2573baddc6bb20c2ee881f — Matthias Beyer 1 year, 18 days ago 25bcb61
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 <mail@beyermatthias.de>
1 files changed, 1 insertions(+), 1 deletions(-)

M lib/core/libimagrt/src/io.rs
M lib/core/libimagrt/src/io.rs => lib/core/libimagrt/src/io.rs +1 -1
@@ 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()),
        }
    }