Skip to content

Commit

Permalink
uint: add a comment why a manual impl is used
Browse files Browse the repository at this point in the history
  • Loading branch information
ordian committed May 12, 2020
1 parent 8740761 commit 25b6790
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions uint/src/uint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1462,6 +1462,8 @@ macro_rules! construct_uint {
}
}

// We implement `Eq` and `Hash` manually to workaround
// https://github.com/rust-lang/rust/issues/61415
impl $crate::core_::cmp::PartialEq for $name {
fn eq(&self, other: &$name) -> bool {
self.cmp(other) == $crate::core_::cmp::Ordering::Equal
Expand Down

0 comments on commit 25b6790

Please sign in to comment.