mirror of
https://github.com/YGGverse/ggemini.git
synced 2026-03-31 17:15:31 +00:00
reorder implementations
This commit is contained in:
parent
edf9982933
commit
962558c123
1 changed files with 6 additions and 6 deletions
|
|
@ -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(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue