clippy lint

This commit is contained in:
Edward Shen 2021-07-11 23:25:17 -04:00
parent 3764af0ed5
commit ec9473fa78
Signed by: edward
GPG key ID: 19182661E818369F

View file

@ -119,9 +119,9 @@ pub async fn default(state: Data<RwLockServerState>, req: HttpRequest) -> impl R
} }
// push_headers(&mut resp_builder); // push_headers(&mut resp_builder);
let mut ret = resp_builder.body(resp.bytes().await.unwrap_or_default()); let mut resp = resp_builder.body(resp.bytes().await.unwrap_or_default());
*ret.headers_mut() = headers; *resp.headers_mut() = headers;
ServerResponse::HttpResponse(ret) ServerResponse::HttpResponse(resp)
} }
#[allow(clippy::future_not_send, clippy::unused_async)] #[allow(clippy::future_not_send, clippy::unused_async)]