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

@@ -6,7 +6,6 @@ use http::{request::Parts, Method, Request as HttpRequest};
use serde::Serialize;
#[cfg(feature = "json")]
use serde_json;
use serde_urlencoded;
use url::Url;
use web_sys::RequestCredentials;
@@ -96,7 +95,7 @@ impl Request {
/// None is returned if a body is which can not be cloned.
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,
};
@@ -106,7 +105,7 @@ impl Request {
headers: self.headers.clone(),
body,
cors: self.cors,
credentials: self.credentials.clone(),
credentials: self.credentials,
})
}
}