Clarify that 'Err' response is not a 'Responder'.

This commit is contained in:
Sergio Benitez 2017-12-21 21:53:13 -08:00
parent 3660d00103
commit 4d7c052a92
1 changed files with 1 additions and 1 deletions

View File

@ -255,7 +255,7 @@ impl<'r, R: Responder<'r>> Responder<'r> for Option<R> {
impl<'r, R: Responder<'r>, E: fmt::Debug> Responder<'r> for Result<R, E> {
default fn respond_to(self, req: &Request) -> Result<Response<'r>, Status> {
self.map(|r| r.respond_to(req)).unwrap_or_else(|e| {
error_!("Response was `Err`: {:?}.", e);
error_!("Response was a non-`Responder` `Err`: {:?}.", e);
Err(Status::InternalServerError)
})
}