aboutsummaryrefslogtreecommitdiffstats
path: root/askama_gotham/src/lib.rs
diff options
context:
space:
mode:
authorLibravatar René Kijewski <kijewski@library.vetmed.fu-berlin.de>2022-02-04 20:13:03 +0100
committerLibravatar Dirkjan Ochtman <dirkjan@ochtman.nl>2022-02-04 20:43:03 +0100
commite808b2a43ece9892314f68028679ec68566b21b3 (patch)
tree5b39952a32735c540bcdf672d2374af85298b005 /askama_gotham/src/lib.rs
parent082a9c2db9bb128956dd70f146af3e0228e4c433 (diff)
downloadaskama-e808b2a43ece9892314f68028679ec68566b21b3.tar.gz
askama-e808b2a43ece9892314f68028679ec68566b21b3.tar.bz2
askama-e808b2a43ece9892314f68028679ec68566b21b3.zip
Remove unneeded external dependencies
Diffstat (limited to '')
-rw-r--r--askama_gotham/src/lib.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/askama_gotham/src/lib.rs b/askama_gotham/src/lib.rs
index c2c933d..a32398d 100644
--- a/askama_gotham/src/lib.rs
+++ b/askama_gotham/src/lib.rs
@@ -5,16 +5,17 @@
pub use askama::*;
pub use gotham::handler::IntoResponse;
+use gotham::hyper::header;
+pub use gotham::hyper::{Body, Response, StatusCode};
pub use gotham::state::State;
-pub use hyper::{Body, Response, StatusCode};
pub fn respond<T: Template>(t: &T, _ext: &str) -> Response<Body> {
match t.render() {
Ok(body) => Response::builder()
.status(StatusCode::OK)
.header(
- hyper::header::CONTENT_TYPE,
- hyper::header::HeaderValue::from_static(T::MIME_TYPE),
+ header::CONTENT_TYPE,
+ header::HeaderValue::from_static(T::MIME_TYPE),
)
.body(body.into())
.unwrap(),