alexcrichton opened PR #11261 from alexcrichton:future-stream-mut-self to bytecodealliance:main:
This commit updates the various methods of
Stream{Reader,Writer}to take a mutable reference toselfinstead ofself-by-value. This is something which I personally feel is more idiomatic and avoids cumbersome and possibly frequent move-in-and-move-out style code. This is additionally coupled with a newis_closedmethod on each of these types to determine if the stream's other end has been closed after the last read/write operation.Closes #11219
<!--
Please make sure you include the following information:
If this work has been discussed elsewhere, please include a link to that
conversation. If it was discussed in an issue, just mention "issue #...".Explain why this change is needed. If the details are in an issue already,
this can be brief.Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.htmlPlease ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->
alexcrichton requested fitzgen for a review on PR #11261.
alexcrichton requested wasmtime-core-reviewers for a review on PR #11261.
alexcrichton requested dicej for a review on PR #11261.
dicej submitted PR review.
alexcrichton updated PR #11261.
alexcrichton has enabled auto merge for PR #11261.
alexcrichton merged PR #11261.
Last updated: Dec 06 2025 at 06:05 UTC