mirror of
https://github.com/fafhrd91/actix-net
synced 2025-01-18 09:41:49 +01:00
Add Display impl for TimeoutError
This commit is contained in:
parent
e354c6df92
commit
b8f9bf4bc8
@ -1,5 +1,12 @@
|
|||||||
# Changes
|
# Changes
|
||||||
|
|
||||||
|
## [0.2.2] - 2019-02-11
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
* Add `Display` impl for `TimeoutError`
|
||||||
|
|
||||||
|
|
||||||
## [0.2.1] - 2019-02-06
|
## [0.2.1] - 2019-02-06
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "actix-utils"
|
name = "actix-utils"
|
||||||
version = "0.2.1"
|
version = "0.2.2"
|
||||||
authors = ["Nikolay Kim <fafhrd91@gmail.com>"]
|
authors = ["Nikolay Kim <fafhrd91@gmail.com>"]
|
||||||
description = "Actix utils - various actix net related services"
|
description = "Actix utils - various actix net related services"
|
||||||
keywords = ["network", "framework", "async", "futures"]
|
keywords = ["network", "framework", "async", "futures"]
|
||||||
|
@ -41,6 +41,15 @@ impl<E: fmt::Debug> fmt::Debug for TimeoutError<E> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl<E: fmt::Display> fmt::Display for TimeoutError<E> {
|
||||||
|
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||||
|
match self {
|
||||||
|
TimeoutError::Service(e) => e.fmt(f),
|
||||||
|
TimeoutError::Timeout => write!(f, "Service call timeout"),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl<E: PartialEq> PartialEq for TimeoutError<E> {
|
impl<E: PartialEq> PartialEq for TimeoutError<E> {
|
||||||
fn eq(&self, other: &TimeoutError<E>) -> bool {
|
fn eq(&self, other: &TimeoutError<E>) -> bool {
|
||||||
match self {
|
match self {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user