fix: deal with new lints from beta clippy (#3389)

Most of this is trivial, apart from the rename of the `clippy::derive_hash_xor_eq` lint to `clippy::derived_hash_with_manual_eq`.

Instead of allowing that lint, we manually implement `PartialEq` and add a comment why the difference between the `PartialEq` and `Hash` implementations are okay.
This commit is contained in:
Thomas Eizinger
2023-02-01 00:20:26 +11:00
committed by GitHub
parent 3ec7c797e5
commit 8f3b7e3876
5 changed files with 20 additions and 23 deletions

View File

@ -320,11 +320,12 @@ impl WithoutPeerIdWithAddress {
/// .condition(PeerCondition::Disconnected)
/// .build();
/// ```
#[derive(Debug, Copy, Clone)]
#[derive(Debug, Copy, Clone, Default)]
pub enum PeerCondition {
/// A new dialing attempt is initiated _only if_ the peer is currently
/// considered disconnected, i.e. there is no established connection
/// and no ongoing dialing attempt.
#[default]
Disconnected,
/// A new dialing attempt is initiated _only if_ there is currently
/// no ongoing dialing attempt, i.e. the peer is either considered
@ -334,9 +335,3 @@ pub enum PeerCondition {
/// configured connection limits.
Always,
}
impl Default for PeerCondition {
fn default() -> Self {
PeerCondition::Disconnected
}
}