Fix some new warnings

This commit is contained in:
Simon Sapin 2019-06-19 16:07:13 +02:00
parent 112f1ddeba
commit 1d38bc0419
65 changed files with 179 additions and 175 deletions

View file

@ -220,7 +220,7 @@ impl Gzip {
}
#[allow(unsafe_code)]
fn poll_with_read(reader: &mut Read, buf: &mut BytesMut) -> Poll<Option<Chunk>, Error> {
fn poll_with_read(reader: &mut dyn Read, buf: &mut BytesMut) -> Poll<Option<Chunk>, Error> {
if buf.remaining_mut() == 0 {
buf.reserve(INIT_BUFFER_SIZE);
}

View file

@ -1054,7 +1054,7 @@ fn http_network_or_cache_fetch(
let forward_response =
http_network_fetch(http_request, credentials_flag, done_chan, context);
// Substep 3
if let Some((200...399, _)) = forward_response.raw_status {
if let Some((200..=399, _)) = forward_response.raw_status {
if !http_request.method.is_safe() {
if let Ok(mut http_cache) = context.state.http_cache.write() {
http_cache.invalidate(&http_request, &forward_response);