summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2020-03-23 15:24:21 +0100
committerMatthias Beyer <mail@beyermatthias.de>2020-03-24 13:31:47 +0100
commit9dedd71451fe8187ce2573baddc6bb20c2ee881f (patch)
tree2d09062ee56ca60d3e7c7cd9bf8ba6bf05aaa5e2 /lib
parent25bcb61319ea172f4fb8028586239b2fa2fd221f (diff)
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>
Diffstat (limited to 'lib')
-rw-r--r--lib/core/libimagrt/src/io.rs2
1 files changed, 1 insertions, 1 deletions
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()),
}
}