From dc1e5c995ad3e2368be5b8ba0d8e38936770d4f9 Mon Sep 17 00:00:00 2001 From: Felix Ableitner Date: Fri, 3 May 2024 00:26:02 +0200 Subject: [PATCH] clippy --- src/fetch/mod.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/fetch/mod.rs b/src/fetch/mod.rs index 494d69e..67165a9 100644 --- a/src/fetch/mod.rs +++ b/src/fetch/mod.rs @@ -65,8 +65,7 @@ pub async fn fetch_object_http( 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));