From d0bb16192b70be73eb7be3f5f7d9979c91e0f9a8 Mon Sep 17 00:00:00 2001 From: Shell Chen Date: Wed, 17 Jul 2019 21:04:59 +0800 Subject: [PATCH] timer: change Into to From trait for Elapsed (#1322) --- tokio-timer/src/timeout.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tokio-timer/src/timeout.rs b/tokio-timer/src/timeout.rs index cf4199155..485547a39 100644 --- a/tokio-timer/src/timeout.rs +++ b/tokio-timer/src/timeout.rs @@ -221,8 +221,8 @@ impl fmt::Display for Elapsed { impl std::error::Error for Elapsed {} -impl Into for Elapsed { - fn into(self) -> std::io::Error { +impl From for std::io::Error { + fn from(_err: Elapsed) -> std::io::Error { std::io::ErrorKind::TimedOut.into() } }