mirror of
https://github.com/LemmyNet/activitypub-federation-rust.git
synced 2024-06-01 19:43:19 +00:00
clippy
This commit is contained in:
parent
c8b48371e0
commit
dc1e5c995a
|
@ -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