Fix more clippy warnings
This commit is contained in:
committed by
Sean McArthur
parent
4be5ec7ffd
commit
2881354c90
@@ -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,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user