mirror of
https://github.com/fafhrd91/actix-web
synced 2025-07-01 00:44:26 +02:00
use mem::take where possible (#1507)
This commit is contained in:
@ -106,7 +106,7 @@ impl<B: MessageBody> MessageBody for EncoderBody<B> {
|
||||
if b.is_empty() {
|
||||
Poll::Ready(None)
|
||||
} else {
|
||||
Poll::Ready(Some(Ok(std::mem::replace(b, Bytes::new()))))
|
||||
Poll::Ready(Some(Ok(std::mem::take(b))))
|
||||
}
|
||||
}
|
||||
EncoderBody::Stream(b) => b.poll_next(cx),
|
||||
|
Reference in New Issue
Block a user