Remove needless borrow

This commit is contained in:
Emii Tatsuo 2020-12-01 19:10:50 -05:00
parent 723986c011
commit aa6c8d8a57
Signed by: Emi
GPG Key ID: 68FAB2E2E6DFC98B
1 changed files with 1 additions and 1 deletions

View File

@ -701,7 +701,7 @@ async fn send_response_header(response: &Response, stream: &mut (impl AsyncWrite
async fn send_response_body(mut body: Option<Body>, stream: &mut (impl AsyncWrite + Unpin + Send)) -> Result<()> {
match &mut body {
Some(Body::Bytes(ref bytes)) => stream.write_all(&bytes).await?,
Some(Body::Bytes(ref bytes)) => stream.write_all(bytes).await?,
Some(Body::Reader(ref mut reader)) => { io::copy(reader, stream).await?; },
None => {},
}