HomePhabricator

[Chronik] Add `Eq` derives for `BlocksError` and `SerError`

Description

[Chronik] Add Eq derives for BlocksError and SerError

Summary:
Rust 1.63 added derive_partial_eq_without_eq to clippy, which gives us a lint that when we derive PartialEq, we should also derive Eq when we can.

Eq requires reflexivity, i.e. a == a. PartialEq is for the case where this is not necessarily true, like for NaN for floats. Since we have reflexivity for these errors, the lint is a true positive and this diff fixes it.

Test Plan:

  1. Upgrade Rust to 1.63 (rustup install 1.63 or rustup update)
  2. Verify the lint is triggered (cargo clippy in /)
  3. (optional) Downgrade Rust to 1.61 (rustup install 1.61)

Reviewers: Fabien, #bitcoin_abc

Reviewed By: Fabien, #bitcoin_abc

Differential Revision: https://reviews.bitcoinabc.org/D12018

Details

Provenance
tobias_ruckAuthored on Sep 21 2022, 14:17
tobias_ruckPushed on Sep 21 2022, 17:12
Reviewer
Restricted Project
Differential Revision
D12018: [Chronik] Add `Eq` derives for `BlocksError` and `SerError`
Parents
rABC4b5388534a27: [Chronik] Upgrade rocksdb dependency to 0.19
Branches
Unknown
Tags
Unknown