Skip to content

Commit ecf68c7

Browse files
committed
Derive commonly required traits for Error
I only need `PartialEq`/`Eq`, but figured I'd add other commonly required traits while I'm at it. I looked at the Rust core library and just derived all traits that `Option` derives, so I don't think I forgot anything important.
1 parent 4696bd0 commit ecf68c7

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,7 @@ pub type Result<T, E> = ::core::result::Result<T, Error<E>>;
259259
///
260260
/// The main use of this enum is to add a `WouldBlock` variant to an existing
261261
/// error enum.
262+
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
262263
pub enum Error<E> {
263264
/// A different kind of error
264265
Other(E),

0 commit comments

Comments
 (0)