clippy
This commit is contained in:
parent
c8b48371e0
commit
dc1e5c995a
1 changed files with 1 additions and 2 deletions
|
|
@ -65,8 +65,7 @@ pub async fn fetch_object_http<T: Clone, Kind: DeserializeOwned>(
|
||||||
let content_type = res
|
let content_type = res
|
||||||
.content_type
|
.content_type
|
||||||
.as_ref()
|
.as_ref()
|
||||||
.map(|c| c.to_str().ok())
|
.and_then(|c| c.to_str().ok())
|
||||||
.flatten()
|
|
||||||
.ok_or(Error::FetchInvalidContentType(res.url.clone()))?;
|
.ok_or(Error::FetchInvalidContentType(res.url.clone()))?;
|
||||||
if !VALID_RESPONSE_CONTENT_TYPES.contains(&content_type) {
|
if !VALID_RESPONSE_CONTENT_TYPES.contains(&content_type) {
|
||||||
return Err(Error::FetchInvalidContentType(res.url));
|
return Err(Error::FetchInvalidContentType(res.url));
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue