mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
809378bd2e
Optimize `io::Write::write_fmt` for constant strings When the formatting args to `fmt::Write::write_fmt` are a statically known string, it simplifies to only calling `write_str` without a runtime branch. Do the same in `io::Write::write_fmt` with `write_all`. Also, match the convention of `fmt::Write` for the name of `args`.