1
Fork 0

hostmeta: Fully qualify reqwest::header::HeaderValue

This commit is contained in:
Steffo 2024-11-11 04:25:06 +01:00
parent 5ecb0bb615
commit 1ba354a1a5
Signed by: steffo
GPG key ID: 5ADA3868646C3FC0

View file

@ -2,7 +2,6 @@
//!
//! [RFC 6415]: https://datatracker.ietf.org/doc/html/rfc6415
use reqwest::header::HeaderValue;
use serde::Deserialize;
/// A [host-meta document] in JRD representation.
@ -334,7 +333,7 @@ pub enum HostMetaGetJRDError {
}
/// Extract the MIME type from the value of the `Content-Type` header.
fn extract_mime_from_content_type(value: &HeaderValue) -> Option<String> {
fn extract_mime_from_content_type(value: &reqwest::header::HeaderValue) -> Option<String> {
let value = value.to_str().ok()?;
match value.split_once("; ") {
None => Some(value.to_string()),