Commit graph

4 commits

Author SHA1 Message Date
Thalia Archibald
523b9d9428 Implement default methods for io::Empty and io::Sink
Eliminate any redundant, unobservable logic from the their default
method implementations.

The observable changes are that `Write::write_fmt` for both types now
ignores the formatting arguments, so a user fmt impl which has side
effects is not invoked, and `Write::write_all_vectored` for both types
does not advance the borrowed buffers. Neither behavior is guaranteed by
the docs and the latter is documented as unspecified.

`Empty` is not marked as vectored, so that `Chain<Empty, _>` and
`Chain<_, Empty>` are not forced to be vectored.
2025-03-10 01:38:20 -07:00
Ralf Jung
e00f27b7be io::Write::write_fmt: panic if the formatter fails when the stream does not fail 2024-05-11 15:13:18 +02:00
许杰友 Jieyou Xu (Joe)
ec2cc761bc
[AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
Albert Larsan
cf2dff2b1e
Move /src/test to /tests 2023-01-11 09:32:08 +00:00
Renamed from src/test/ui/write-fmt-errors.rs (Browse further)