Clippy fixes

This commit is contained in:
Nikolay Kim 2022-02-11 17:25:18 +06:00
parent aab6eef780
commit cb4dbe0131
8 changed files with 9 additions and 9 deletions

View file

@ -41,7 +41,7 @@ where
type Output = T;
fn poll(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<T> {
(&mut self.f)(cx)
(self.f)(cx)
}
}

View file

@ -508,7 +508,7 @@ impl ClientRequest {
c.value().as_bytes(),
crate::http::helpers::USERINFO,
);
let _ = write!(&mut cookie, "; {}={}", name, value);
let _ = write!(cookie, "; {}={}", name, value);
}
self.head.headers.insert(
header::COOKIE,

View file

@ -96,7 +96,7 @@ impl TestResponse {
percent_encode(c.name().as_bytes(), crate::http::helpers::USERINFO);
let value =
percent_encode(c.value().as_bytes(), crate::http::helpers::USERINFO);
let _ = write!(&mut cookie, "; {}={}", name, value);
let _ = write!(cookie, "; {}={}", name, value);
}
if !cookie.is_empty() {
head.headers.insert(

View file

@ -246,7 +246,7 @@ where
}
Poll::Pending => Poll::Pending,
Poll::Ready(Err(e)) => {
let res: Response = (&e).into();
let res: Response = e.into();
let (res, body) = res.replace_body(());
let mut send = send.take().unwrap();

View file

@ -605,7 +605,7 @@ impl ResponseBuilder {
self.body(Body::from(body))
}
Err(e) => (&e).into(),
Err(e) => e.into(),
}
}
@ -750,7 +750,7 @@ where
fn from(res: Result<I, E>) -> Self {
match res {
Ok(val) => val.into(),
Err(err) => (&err).into(),
Err(err) => err.into(),
}
}
}

View file

@ -165,7 +165,7 @@ impl TestRequest {
for c in inner.cookies.delta() {
let name = percent_encode(c.name().as_bytes(), super::helpers::USERINFO);
let value = percent_encode(c.value().as_bytes(), super::helpers::USERINFO);
let _ = write!(&mut cookie, "; {}={}", name, value);
let _ = write!(cookie, "; {}={}", name, value);
}
if !cookie.is_empty() {
head.headers.insert(

View file

@ -175,7 +175,7 @@ impl Accept {
fn update_status(&mut self, st: ServerStatus) {
if let Some(ref mut hnd) = self.status_handler {
(&mut *hnd)(st)
(*hnd)(st)
}
}

View file

@ -583,7 +583,7 @@ where
c.value().as_bytes(),
crate::http::helpers::USERINFO,
);
let _ = write!(&mut cookie, "; {}={}", name, value);
let _ = write!(cookie, "; {}={}", name, value);
}
inner.head.headers.insert(
header::COOKIE,