sync: derive PartialEq for error enums (#2137)

This commit is contained in:
Koki Kato 2020-01-22 04:25:44 +09:00 committed by Carl Lerche
parent 0bb17300f7
commit a5e774bb38
2 changed files with 2 additions and 2 deletions

View File

@ -69,7 +69,7 @@ impl Error for RecvError {}
/// This enumeration is the list of the possible reasons that try_recv
/// could not return data when called.
#[derive(Debug)]
#[derive(Debug, PartialEq)]
pub enum TryRecvError {
/// This channel is currently empty, but the Sender(s) have not yet
/// disconnected, so data may yet become available.

View File

@ -40,7 +40,7 @@ pub mod error {
pub struct RecvError(pub(super) ());
/// Error returned by the `try_recv` function on `Receiver`.
#[derive(Debug)]
#[derive(Debug, PartialEq)]
pub enum TryRecvError {
/// The send half of the channel has not yet sent a value.
Empty,