Use a parametric lifetime in 'Responder' example.

This commit is contained in:
Sergio Benitez 2017-07-14 09:42:33 -07:00
parent aa51fe0e11
commit 722959ee29
1 changed files with 2 additions and 2 deletions

View File

@ -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)