This repository has been archived by the owner on Sep 12, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement PartialOrd manually for BitMexPriceEventId
This is important because deriving `PartialOrd` means that it looks at all the struct's fields in order. For this type we want to compare the `timestamp`, but do not care about the `digits`! More importantly, someone could unintentionally change this behaviour by reordering the fields. We also remove the `Ord` derived implementation because: - It's unused. - Deriving `Ord` when manually implementing `PartialOrd` is a very bad idea[1]. [1]: rust-lang/rust-clippy#1621. Co-authored-by: Daniel Karzel <daniel.karzel@coblox.tech>
- Loading branch information