From 722959ee29a90fdfcdff4a568738737596708d4d Mon Sep 17 00:00:00 2001 From: Sergio Benitez Date: Fri, 14 Jul 2017 09:42:33 -0700 Subject: [PATCH] Use a parametric lifetime in 'Responder' example. --- lib/src/response/responder.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/src/response/responder.rs b/lib/src/response/responder.rs index da64be26..dd9fdbd1 100644 --- a/lib/src/response/responder.rs +++ b/lib/src/response/responder.rs @@ -150,8 +150,8 @@ use request::Request; /// use rocket::response::{self, Response, Responder}; /// use rocket::http::ContentType; /// -/// impl Responder<'static> for Person { -/// fn respond_to(self, _: &Request) -> response::Result<'static> { +/// impl<'r> Responder<'r> for Person { +/// fn respond_to(self, _: &Request) -> response::Result<'r> { /// Response::build() /// .sized_body(Cursor::new(format!("{}:{}", self.name, self.age))) /// .raw_header("X-Person-Name", self.name)