Correcting overly restrictive lifetimes in vectored IO by ejmount · Pull Request...
source link: https://github.com/rust-lang/futures-rs/pull/2484
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
The current input lifetimes for write_vectored
and write_all_vectored
in AsyncWriteExt
and read_vectored
in AsyncReadExt
are unnecessarily restrictive and disallow otherwise reasonable uses. This change fixes #2483 by relaxing that restriction, making the lifetime of the incoming references independent of the inner lifetime that the IoSlice
s refer to. (They could be relaxed further, but I can't see any practical difference it would make so I have tried to be consistent with the surrounding code)
Please let me know if you'd like any other changes made for this issue, or any other comments you have.
(Edit: Apologies for any log/notification noise the repeated CI runs generated, some unrelated tests wouldn't run cleanly on my local machine)
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK