This repository has been archived by the owner on Sep 12, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ignore digits when deriving BitMexPriceEventId's PartialOrd
This is important because deriving `PartialOrd` normally 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 have to ignore the `digits` field for other derived traits, because inconsistencies there could cause trouble[1]. [1]: rust-lang/rust-clippy#1621. Co-authored-by: Daniel Karzel <[email protected]>
- Loading branch information
Showing
3 changed files
with
11 additions
and
3 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters