Implement Responder for Response.

This commit is contained in:
Sergio Benitez 2016-12-15 20:57:14 -08:00
parent 368e5105a9
commit 5f311c3654
1 changed files with 8 additions and 0 deletions

View File

@ -2,6 +2,7 @@ use std::{io, fmt, str};
use std::borrow::Cow;
use http::{Header, HeaderMap};
use response::Responder;
use http::Status;
pub const DEFAULT_CHUNK_SIZE: u64 = 4096;
@ -331,3 +332,10 @@ impl<'r> fmt::Debug for Response<'r> {
}
}
}
impl<'r> Responder<'r> for Response<'r> {
/// This is the identity implementation. It simply returns `Ok(self)`.
fn respond(self) -> Result<Response<'r>, Status> {
Ok(self)
}
}