mirror of
https://github.com/LemmyNet/activitypub-federation-rust.git
synced 2024-05-18 00:52:40 +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
|
||||
.content_type
|
||||
.as_ref()
|
||||
.map(|c| c.to_str().ok())
|
||||
.flatten()
|
||||
.and_then(|c| c.to_str().ok())
|
||||
.ok_or(Error::FetchInvalidContentType(res.url.clone()))?;
|
||||
if !VALID_RESPONSE_CONTENT_TYPES.contains(&content_type) {
|
||||
return Err(Error::FetchInvalidContentType(res.url));
|
||||
|
|
Loading…
Reference in a new issue