timer: impl Into<std::io::Error> for Elpased (#1321)

That convert Elpased to ErrorKind::TimedOut
This commit is contained in:
Shell Chen 2019-07-17 11:22:03 +08:00 committed by Carl Lerche
parent 003b4d8074
commit a18ddb3b61

View File

@ -220,3 +220,9 @@ impl fmt::Display for Elapsed {
}
impl std::error::Error for Elapsed {}
impl Into<std::io::Error> for Elapsed {
fn into(self) -> std::io::Error {
std::io::ErrorKind::TimedOut.into()
}
}