From d8847cf89171e8b7872195724830a276c421f63e Mon Sep 17 00:00:00 2001 From: wathen Date: Mon, 3 Jul 2023 16:11:00 +0800 Subject: [PATCH] sync: fix import style for `std::error::Error` (#5818) --- tokio/src/sync/mpsc/error.rs | 2 +- tokio/src/sync/watch.rs | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/tokio/src/sync/mpsc/error.rs b/tokio/src/sync/mpsc/error.rs index 25b4455be..e41885664 100644 --- a/tokio/src/sync/mpsc/error.rs +++ b/tokio/src/sync/mpsc/error.rs @@ -19,7 +19,7 @@ impl fmt::Display for SendError { } } -impl std::error::Error for SendError {} +impl Error for SendError {} // ===== TrySendError ===== diff --git a/tokio/src/sync/watch.rs b/tokio/src/sync/watch.rs index 61049b71e..ad6453989 100644 --- a/tokio/src/sync/watch.rs +++ b/tokio/src/sync/watch.rs @@ -205,6 +205,7 @@ impl fmt::Debug for Shared { pub mod error { //! Watch error types. + use std::error::Error; use std::fmt; /// Error produced when sending a value fails. @@ -225,7 +226,7 @@ pub mod error { } } - impl std::error::Error for SendError {} + impl Error for SendError {} /// Error produced when receiving a change notification. #[derive(Debug, Clone)] @@ -239,7 +240,7 @@ pub mod error { } } - impl std::error::Error for RecvError {} + impl Error for RecvError {} } mod big_notify {