mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-06-26 16:21:39 +00:00
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:
@ -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
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user