This repository has been archived by the owner on Mar 25, 2024. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix FmtToIoWriter::write_str to call write_all
Previously, the implementation could silently fail to write some bytes. Now, the implementation should either write all the bytes or return an error. The docs for `std::fmt::Write::write_str` say, "This method can only succeed if the entire string slice was successfully written, and this method will not return until all data has been written or an error occurs." So, `FmtToIoWriter::write_str` must call `std::io::Write::write_all` instead of `std::io::Write::write` on the inner writer in order to ensure that all the bytes are written.
- Loading branch information