mirror of
https://github.com/ntex-rs/ntex.git
synced 2025-04-04 21:37:58 +03:00
Clippy fixes
This commit is contained in:
parent
aab6eef780
commit
cb4dbe0131
8 changed files with 9 additions and 9 deletions
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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(
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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(
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue