1
0
mirror of https://github.com/actix/actix-extras.git synced 2025-06-30 03:44:27 +02:00

clippy warnings

This commit is contained in:
Nikolay Kim
2018-05-17 12:23:37 -07:00
parent 45e9aaa462
commit 16906c5951
3 changed files with 6 additions and 3 deletions

View File

@ -386,6 +386,8 @@ impl ContentEncoder {
let version = resp.version().unwrap_or_else(|| req.version);
let is_head = req.method == Method::HEAD;
let mut len = 0;
#[cfg_attr(feature = "cargo-clippy", allow(match_ref_pats))]
let has_body = match resp.body() {
&Body::Empty => false,
&Body::Binary(ref bin) => {
@ -424,6 +426,7 @@ impl ContentEncoder {
ContentEncoding::Identity
};
#[cfg_attr(feature = "cargo-clippy", allow(match_ref_pats))]
let mut transfer = match resp.body() {
&Body::Empty => {
if req.method != Method::HEAD {