From d5ac083b15ef70d7d51e74ad1eaa3ca534e8a153 Mon Sep 17 00:00:00 2001 From: Eliza Weisman Date: Tue, 15 Mar 2022 09:09:50 -0700 Subject: [PATCH] feat(mpsc): add `std::error::Error` impls Signed-off-by: Eliza Weisman --- src/mpsc.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/mpsc.rs b/src/mpsc.rs index 7bda5ad..6bf9305 100644 --- a/src/mpsc.rs +++ b/src/mpsc.rs @@ -89,6 +89,9 @@ impl fmt::Display for Closed { } } +#[cfg(feature = "std")] +impl std::error::Error for Closed {} + // === impl TrySendError === impl TrySendError { @@ -146,6 +149,9 @@ impl fmt::Display for TrySendError { } } +#[cfg(feature = "std")] +impl std::error::Error for TrySendError {} + // ==== impl Inner ==== impl ChannelCore {