Skip to content

Commit 60b8536

Browse files
committed
🐛 Write should return the number of byte consumed
1 parent 687a830 commit 60b8536

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/tools/stdio.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ where
3434
pub struct WriteNoWhere;
3535

3636
impl Write for WriteNoWhere {
37-
fn write(&mut self, _buf: &[u8]) -> std::io::Result<usize> {
38-
Ok(0)
37+
fn write(&mut self, buf: &[u8]) -> std::io::Result<usize> {
38+
Ok(buf.len() as usize)
3939
}
4040

4141
fn flush(&mut self) -> std::io::Result<()> {

0 commit comments

Comments
 (0)