Implement 'From<Status>' for 'Failure'.

Resolves #399.
This commit is contained in:
Ram 2017-09-01 17:45:42 +10:00 committed by Sergio Benitez
parent e656ec87d7
commit 0930304aad
1 changed files with 6 additions and 0 deletions

View File

@ -12,3 +12,9 @@ impl Responder<'static> for Failure {
Err(self.0) Err(self.0)
} }
} }
impl From<Status> for Failure {
fn from(status: Status) -> Self {
Failure(status)
}
}