Skip to content

Commit

Permalink
add ord and partial-ord implementations for Compact
Browse files Browse the repository at this point in the history
  • Loading branch information
rphmeier committed Nov 22, 2018
1 parent 77ea270 commit 77c01c6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/codec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ pub trait Decode: Sized {
pub trait Codec: Decode + Encode {}

/// Compact-encoded variant of T. This is more space-efficient but less compute-efficient.
#[derive(Eq, PartialEq, Clone, Copy)]
#[derive(Eq, PartialEq, Clone, Copy, Ord, PartialOrd)]
pub struct Compact<T>(pub T);

impl<T> From<T> for Compact<T> {
Expand Down

0 comments on commit 77c01c6

Please sign in to comment.