refactor(multiple): Clippy run

This commit is contained in:
leonardo.yvens
2016-06-04 11:21:53 -03:00
parent 0c847f7898
commit d4a095d75c
16 changed files with 50 additions and 71 deletions

View File

@@ -91,7 +91,7 @@ impl Charset {
Gb2312 => "GB2312",
Big5 => "5",
Koi8_R => "KOI8-R",
Ext(ref s) => &s
Ext(ref s) => s
}
}
}

View File

@@ -4,10 +4,10 @@ use std::fmt::{self, Display};
// check that each char in the slice is either:
// 1. %x21, or
// 2. in the range %x23 to %x7E, or
// 3. in the range %x80 to %xFF
// 3. above %x80
fn check_slice_validity(slice: &str) -> bool {
slice.bytes().all(|c|
c == b'\x21' || (c >= b'\x23' && c <= b'\x7e') | (c >= b'\x80' && c <= b'\xff'))
c == b'\x21' || (c >= b'\x23' && c <= b'\x7e') | (c >= b'\x80'))
}
/// An entity tag, defined in [RFC7232](https://tools.ietf.org/html/rfc7232#section-2.3)