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

@@ -414,7 +414,7 @@ impl Response {
//
// HTTP/1.1 200 OK\r\n
let mut stream =
stream::DeadlineStream::new(stream, unit.as_ref().and_then(|u| u.deadline.clone()));
stream::DeadlineStream::new(stream, unit.as_ref().and_then(|u| u.deadline));
let status_line = read_next_line(&mut stream)?;
let (index, status) = parse_status_line(status_line.as_str())?;
@@ -559,7 +559,7 @@ impl<'a> Iterator for Hist<'a> {
};
self.response = response.previous.as_deref();
return Some(response);
Some(response)
}
}