Should IoSliceMut::advance() be used when impl std::io::Read::read_vectored()? #128669
Labels
A-docs
Area: Documentation for any part of the project, including the compiler, standard library, and tools
A-io
Area: `std::io`, `std::fs`, `std::net` and `std::path`
C-discussion
Category: Discussion or questions that doesn't represent real issues.
T-libs
Relevant to the library team, which will review and decide on the PR/issue.
T-libs-api
Relevant to the library API team, which will review and decide on the PR/issue.
As of io_slice_advance is stable since 1.81, the following asserting may won't work if the users use IoSliceMut::advance in their impl of
Read
trait.It is unclear that whether the returned size of
read_vectored
is the real read data size, or the valid buffer size in the passed&mut [IoSliceMut<'_>]
.Please clarify that so
Read
implementations can do the correct thing.The text was updated successfully, but these errors were encountered: