Fix some clippy lints (#292)

This commit can be replicated with `cargo +nightly clippy --fix -Z unstable-options`,
plus an edit to fix another `return` missed by clippy.
This commit is contained in:
Joshua Nelson
2021-01-03 23:10:43 -05:00
committed by GitHub
parent 6126a2fe50
commit f0245aad23
7 changed files with 15 additions and 15 deletions

View File

@@ -85,7 +85,7 @@ pub fn add_header(headers: &mut Vec<Header>, header: Header) {
// tchar = "!" / "#" / "$" / "%" / "&" / "'" / "*" / "+" / "-" / "." /
// "^" / "_" / "`" / "|" / "~" / DIGIT / ALPHA
fn valid_name(name: &str) -> bool {
name.len() > 0 && name.bytes().all(is_tchar)
!name.is_empty() && name.bytes().all(is_tchar)
}
#[inline]