timer: impl Into<std::io::Error> for Elpased
That convert Elpased to ErrorKind::TimedOut
@@ -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()
+ }
+}
