impl From<Status> for Failure

This commit is contained in:
Ram 2017-09-01 17:45:42 +10:00
parent 2b3aa01463
commit 4fde6628f0
1 changed files with 6 additions and 0 deletions

View File

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