mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-23 00:00:10 +02:00
timer: impl Into<std::io::Error> for Elpased (#1321)
That convert Elpased to ErrorKind::TimedOut
This commit is contained in:
@@ -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()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user