Skip to content

Commit

Permalink
feat(mpsc): add std::error::Error impls
Browse files Browse the repository at this point in the history
Signed-off-by: Eliza Weisman <[email protected]>
  • Loading branch information
hawkw committed Mar 15, 2022
1 parent d5bf3db commit d5ac083
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/mpsc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ impl<T> fmt::Display for Closed<T> {
}
}

#[cfg(feature = "std")]
impl<T> std::error::Error for Closed<T> {}

// === impl TrySendError ===

impl TrySendError {
Expand Down Expand Up @@ -146,6 +149,9 @@ impl<T> fmt::Display for TrySendError<T> {
}
}

#[cfg(feature = "std")]
impl<T> std::error::Error for TrySendError<T> {}

// ==== impl Inner ====

impl<N> ChannelCore<N> {
Expand Down

0 comments on commit d5ac083

Please sign in to comment.