Remove needless borrow
This commit is contained in:
parent
723986c011
commit
aa6c8d8a57
|
@ -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<()> {
|
async fn send_response_body(mut body: Option<Body>, stream: &mut (impl AsyncWrite + Unpin + Send)) -> Result<()> {
|
||||||
match &mut body {
|
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?; },
|
Some(Body::Reader(ref mut reader)) => { io::copy(reader, stream).await?; },
|
||||||
None => {},
|
None => {},
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue