reorder implementations

This commit is contained in:
yggverse 2025-01-18 02:40:21 +02:00
parent edf9982933
commit 962558c123

View file

@ -9,12 +9,6 @@ use glib::{Regex, RegexCompileFlags, RegexMatchFlags};
/// * the value stored in lowercase
pub struct Mime(String);
impl std::fmt::Display for Mime {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
write!(f, "{}", self.0)
}
}
impl Mime {
// Constructors
@ -57,6 +51,12 @@ impl Mime {
}
}
impl std::fmt::Display for Mime {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
write!(f, "{}", self.0)
}
}
/// Extract MIME type from from string that includes **header**
pub fn parse(s: &str) -> Option<String> {
Regex::split_simple(