diff options
-rw-r--r-- | src/lib.rs | 15 |
1 files changed, 5 insertions, 10 deletions
@@ -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() } } |