1
0
Fork 0
mirror of https://github.com/actix/actix-web.git synced 2024-12-26 18:10:37 +00:00

impl ResponseError for SendError when possible (#619)

This commit is contained in:
ethanpailes 2018-12-11 11:37:52 -05:00 committed by Douman
parent 86af02156b
commit 90eef31cc0
2 changed files with 8 additions and 1 deletions

View file

@ -6,6 +6,9 @@
* Implement `FromRequest` extractor for `Either<A,B>`
* Implement `ResponseError` for `SendError`
## [0.7.15] - 2018-12-05
### Changed

View file

@ -5,7 +5,7 @@ use std::string::FromUtf8Error;
use std::sync::Mutex;
use std::{fmt, io, result};
use actix::MailboxError;
use actix::{MailboxError, SendError};
use cookie;
use failure::{self, Backtrace, Fail};
use futures::Canceled;
@ -136,6 +136,10 @@ pub trait ResponseError: Fail + InternalResponseErrorAsFail {
}
}
impl<T> ResponseError for SendError<T>
where T: Send + Sync + 'static {
}
impl fmt::Display for Error {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
fmt::Display::fmt(&self.cause, f)