Skip to content
This repository has been archived by the owner on Mar 25, 2024. It is now read-only.

Fix FmtToIoWriter::write_str to call write_all #206

Merged
merged 1 commit into from Aug 18, 2021

Commits on Aug 18, 2021

  1. 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.
    jturner314 committed Aug 18, 2021
    Copy the full SHA
    b6c38bf View commit details
    Browse the repository at this point in the history