1
0
Fork 0
mirror of https://github.com/actix/actix-web.git synced 2024-09-20 18:40:08 +00:00

actix-web-actors: take the internal buffer when yielding (#3369)

* actix-web-actors: take the internal buffer when yielding

* actix-web-actors: Add CHANGES entry re: taking buffer
This commit is contained in:
asonix 2024-06-09 00:04:42 -05:00 committed by GitHub
parent 8018983a68
commit f7646bcc48
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 1 deletions

View file

@ -2,6 +2,7 @@
## Unreleased
- Take the encoded buffer when yielding bytes in the response stream rather than splitting the buffer, reducing memory use
- Minimum supported Rust version (MSRV) is now 1.72.
## 4.3.0

View file

@ -710,7 +710,7 @@ where
}
if !this.buf.is_empty() {
Poll::Ready(Some(Ok(this.buf.split().freeze())))
Poll::Ready(Some(Ok(std::mem::take(&mut this.buf).freeze())))
} else if this.fut.alive() && !this.closed {
Poll::Pending
} else {