You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix return value of Write::write impl for Pipe (#120)
* Fix return value of `Write::write` impl for `Pipe`
This should return the number of bytes written, which as implemented
is the whole buffer.
Without this, the default `write_all` implementation won't work
correctly, which is a problem with
c520a21.
* Use `.write` instead of `printfl!` to write `""`
Now that `printfl!` calls `write_all`, rather than `write`, this no
longer works. The `write_all` implementation provided by the `Write`
trait writes until the buffer of bytes left to write is empty, so `write`
is never if an empty string is passed, and thus a `Pipe` doesn't send a
message with `done`.
There are probably better ways to deal with the APIs involved here, but
this at least fixes the behavior.
0 commit comments