Cleanup code that was warned by rust-clippy

This commit is contained in:
Corey Farwell 2015-10-11 20:47:45 -04:00
parent 9c1cb9f61e
commit 81e034885b
9 changed files with 273 additions and 284 deletions

View file

@ -419,19 +419,19 @@ impl<R: HttpResponse> StreamedResponse<R> {
let result = GzDecoder::new(response);
match result {
Ok(response_decoding) => {
return Ok(StreamedResponse::new(m, Decoder::Gzip(response_decoding)));
Ok(StreamedResponse::new(m, Decoder::Gzip(response_decoding)))
}
Err(err) => {
return Err(LoadError::Decoding(m.final_url, err.to_string()));
Err(LoadError::Decoding(m.final_url, err.to_string()))
}
}
}
Some(Encoding::Deflate) => {
let response_decoding = DeflateDecoder::new(response);
return Ok(StreamedResponse::new(m, Decoder::Deflate(response_decoding)));
Ok(StreamedResponse::new(m, Decoder::Deflate(response_decoding)))
}
_ => {
return Ok(StreamedResponse::new(m, Decoder::Plain(response)));
Ok(StreamedResponse::new(m, Decoder::Plain(response)))
}
}
}