mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-09-08 00:00:13 +02:00
timer: change Into to From trait for Elapsed (#1322)
This commit is contained in:
committed by
Toby Lawrence
parent
a18ddb3b61
commit
d0bb16192b
@@ -221,8 +221,8 @@ impl fmt::Display for Elapsed {
|
|||||||
|
|
||||||
impl std::error::Error for Elapsed {}
|
impl std::error::Error for Elapsed {}
|
||||||
|
|
||||||
impl Into<std::io::Error> for Elapsed {
|
impl From<Elapsed> for std::io::Error {
|
||||||
fn into(self) -> std::io::Error {
|
fn from(_err: Elapsed) -> std::io::Error {
|
||||||
std::io::ErrorKind::TimedOut.into()
|
std::io::ErrorKind::TimedOut.into()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user