aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/lib.rs15
1 files changed, 5 insertions, 10 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 0549a3f..b05ec3a 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -77,16 +77,11 @@ macro_rules! implement_responder_for {
// So it will have to be passed in to the argument at
// the macro incovation instead.
($template_type:ty) => (
- use rocket::response::{Response, Responder};
- use rocket::http::{ContentType, Status};
- use std::io::Cursor;
- use rocket::request::Request;
-
- impl<'a> Responder<'a> for $template_type {
- fn respond_to(self, _: &Request) -> Result<Response<'static>, Status> {
- Response::build()
- .header(ContentType::HTML)
- .sized_body(Cursor::new(format!("{}", &self)))
+ impl<'a> ::rocket::response::Responder<'a> for $template_type {
+ fn respond_to(self, _: &::rocket::Request) -> Result<::rocket::Response<'static>, ::rocket::http::Status> {
+ ::rocket::Response::build()
+ .header(::rocket::http::ContentType::HTML)
+ .sized_body(::std::io::Cursor::new(format!("{}", &self)))
.ok()
}
}