1
0
mirror of https://github.com/fafhrd91/actix-net synced 2024-11-24 00:01:11 +01:00

Add Display impl for InOrderError

This commit is contained in:
Nikolay Kim 2019-02-11 08:39:28 -08:00
parent b8f9bf4bc8
commit 32f4718880
2 changed files with 11 additions and 0 deletions

View File

@ -6,6 +6,8 @@
* Add `Display` impl for `TimeoutError`
* Add `Display` impl for `InOrderError`
## [0.2.1] - 2019-02-06

View File

@ -37,6 +37,15 @@ impl<E: fmt::Debug> fmt::Debug for InOrderError<E> {
}
}
impl<E: fmt::Display> fmt::Display for InOrderError<E> {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match self {
InOrderError::Service(e) => e.fmt(f),
InOrderError::Disconnected => write!(f, "InOrder service disconnected"),
}
}
}
/// InOrder - The service will yield responses as they become available,
/// in the order that their originating requests were submitted to the service.
pub struct InOrder<S> {