Fix clippy warnings

This commit is contained in:
Martin Algesten
2021-03-24 20:05:51 +01:00
parent ea53c7cedd
commit b42e9afd71
6 changed files with 26 additions and 27 deletions

View File

@@ -36,7 +36,7 @@ impl Unit {
agent: &Agent,
method: &str,
url: &Url,
headers: &Vec<Header>,
headers: &[Header],
body: &SizedReader,
deadline: Option<time::Instant>,
) -> Self {
@@ -229,7 +229,7 @@ fn connect_inner(
let host = unit
.url
.host_str()
.ok_or(ErrorKind::InvalidUrl.msg("no host in URL"))?;
.ok_or_else(|| ErrorKind::InvalidUrl.msg("no host in URL"))?;
let url = &unit.url;
let method = &unit.method;
// open socket