remove frivolous mime guessing dep

This commit is contained in:
Martin Algesten
2018-06-22 10:49:43 +02:00
parent 72bcbe45db
commit 67e7919b06
5 changed files with 1 additions and 175 deletions

View File

@@ -332,18 +332,6 @@ fn basic_auth(user: &str, pass: &str) -> String {
::base64::encode(&format!("{}:{}", safe, pass))
}
fn mime_of<S: Into<String>>(s: S) -> String {
let s = s.into();
match &s[..] {
"json" => "application/json",
"form" => "application/x-www-form-urlencoded",
_ => match ::mime_guess::get_mime_type_str(&s) {
Some(mime) => mime,
None => "foo",
},
}.to_string()
}
#[cfg(test)]
mod tests {
use super::*;