diff --git a/actix-utils/CHANGES.md b/actix-utils/CHANGES.md index 4a491a60..7bc18b4b 100644 --- a/actix-utils/CHANGES.md +++ b/actix-utils/CHANGES.md @@ -6,6 +6,8 @@ * Add `Display` impl for `TimeoutError` +* Add `Display` impl for `InOrderError` + ## [0.2.1] - 2019-02-06 diff --git a/actix-utils/src/order.rs b/actix-utils/src/order.rs index 9a901614..f6caff27 100644 --- a/actix-utils/src/order.rs +++ b/actix-utils/src/order.rs @@ -37,6 +37,15 @@ impl fmt::Debug for InOrderError { } } +impl fmt::Display for InOrderError { + 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 {