Remove usage of deprecated std::error::Error methods (#1206) (#1245)

This commit is contained in:
Steffen Butzer
2019-07-03 23:06:03 -07:00
committed by Carl Lerche
parent 516251052d
commit 0651f09427
17 changed files with 70 additions and 186 deletions
+2 -7
View File
@@ -117,16 +117,11 @@ pub mod error {
impl<T: fmt::Debug> fmt::Display for SendError<T> {
fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result {
use std::error::Error;
write!(fmt, "{}", self.description())
write!(fmt, "channel closed")
}
}
impl<T: fmt::Debug> ::std::error::Error for SendError<T> {
fn description(&self) -> &str {
"channel closed"
}
}
impl<T: fmt::Debug> ::std::error::Error for SendError<T> {}
}
#[derive(Debug)]