Skip to content

Commit

Permalink
feat: add inverse partialeq for chainid (#136)
Browse files Browse the repository at this point in the history
supports `==` with both types on either side
  • Loading branch information
mattsse authored Jan 28, 2025
1 parent e4d7a19 commit 979d31f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,13 @@ impl PartialEq<u64> for Chain {
}
}

impl PartialEq<Chain> for u64 {
#[inline]
fn eq(&self, other: &Chain) -> bool {
other.eq(self)
}
}

impl PartialOrd<u64> for Chain {
#[inline]
fn partial_cmp(&self, other: &u64) -> Option<Ordering> {
Expand Down

0 comments on commit 979d31f

Please sign in to comment.