Page MenuHomePhabricator

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

Authored by tobias_ruck on Sep 21 2022, 14:20.

Details

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)

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable