Skip to content

Replace most `std::io::Write::write` with `write_all`

Michael Aaron Murphy requested to merge gyscos:master into master

Created by: gyscos

std::io::Write doesn't guarantees that it will write everything, and could even return a non-fatal ErrorKind::Interrupted error. write_all has exactly the code required to deal with this.

In most cases, the receiving Write has enough buffer to take all the input, which is why this was never an issue in practice, but it was still a dangerous thing to do.

The remaining write() are actual legit uses.

Merge request reports