Fix more clippy warnings

This commit is contained in:
Jonas Platte
2021-08-25 11:30:34 +02:00
committed by Sean McArthur
parent 4be5ec7ffd
commit 2881354c90
6 changed files with 12 additions and 14 deletions

View File

@@ -130,13 +130,13 @@ impl Request {
/// `None` is returned if the request can not be cloned, i.e. if the body is a stream.
pub fn try_clone(&self) -> Option<Request> {
let body = match self.body.as_ref() {
Some(ref body) => Some(body.try_clone()?),
Some(body) => Some(body.try_clone()?),
None => None,
};
let mut req = Request::new(self.method().clone(), self.url().clone());
*req.timeout_mut() = self.timeout().cloned();
*req.headers_mut() = self.headers().clone();
*req.version_mut() = self.version().clone();
*req.version_mut() = self.version();
req.body = body;
Some(req)
}
@@ -565,7 +565,7 @@ where
headers,
body: Some(body.into()),
timeout: None,
version: version,
version,
})
}
}