mirror of
https://gitlab.com/Anson-Projects/zine.git
synced 2025-07-27 00:31:23 +00:00
Thanks Clippy
This commit is contained in:
@@ -42,9 +42,7 @@ pub fn is_valid_image_url(url: &str) -> Result<bool, Box<dyn std::error::Error>>
|
||||
let content_type = response.headers().get(reqwest::header::CONTENT_TYPE);
|
||||
|
||||
Ok(status.is_success()
|
||||
&& content_type.map_or(false, |ct| {
|
||||
ct.to_str().map_or(false, |s| s.starts_with("image/"))
|
||||
}))
|
||||
&& content_type.is_some_and(|ct| ct.to_str().is_ok_and(|s| s.starts_with("image/"))))
|
||||
}
|
||||
|
||||
pub fn is_valid_url(url: &str) -> bool {
|
||||
|
Reference in New Issue
Block a user