diff options
author | DCjanus <DCjanus@dcjanus.com> | 2020-01-11 23:44:18 +0800 |
---|---|---|
committer | Dirkjan Ochtman <dirkjan@ochtman.nl> | 2020-01-11 17:43:55 +0100 |
commit | 100679e69d37355f3683df43e58aab21312ea147 (patch) | |
tree | 957f2110145fc4187b293fbf42d4fd0feb023d30 | |
parent | 6b11df9e92c7414968d71c65249d273183ecd716 (diff) | |
download | askama-100679e69d37355f3683df43e58aab21312ea147.tar.gz askama-100679e69d37355f3683df43e58aab21312ea147.tar.bz2 askama-100679e69d37355f3683df43e58aab21312ea147.zip |
fix clippy warnings
Diffstat (limited to '')
-rw-r--r-- | askama/src/lib.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/askama/src/lib.rs b/askama/src/lib.rs index 47f7739..55403c2 100644 --- a/askama/src/lib.rs +++ b/askama/src/lib.rs @@ -544,7 +544,7 @@ pub mod rocket { #[cfg(all(feature = "mime_guess", feature = "mime"))] fn get_mime_type(ext: &str) -> mime_guess::Mime { - let basic_type = mime_guess::get_mime_type(ext); + let basic_type = mime_guess::from_ext(ext).first_or_octet_stream(); for (simple, utf_8) in &TEXT_TYPES { if &basic_type == simple { return utf_8.clone(); @@ -616,7 +616,7 @@ pub mod gotham { match t.render() { Ok(body) => Response::builder() .status(StatusCode::OK) - .header("content-type", mime_type.to_string()) + .header("content-type", mime_type) .body(body.into()) .unwrap(), Err(_) => Response::builder() |