Skip to content

Commit ab7725a

Browse files
committed
add PartialEq, Eq to some types
1 parent c4e7e4c commit ab7725a

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

crates/anemo/src/types/address.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/// Representation of a network address that is dial-able in Anemo
2-
#[derive(Clone, Debug)]
2+
#[derive(Clone, Debug, PartialEq, Eq)]
33
pub enum Address {
44
/// A plain SocketAddr
55
SocketAddr(std::net::SocketAddr),

crates/anemo/src/types/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ pub mod header {
4343
pub const TIMEOUT: &str = "timeout";
4444
}
4545

46-
#[derive(Clone, Copy, Debug)]
46+
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
4747
pub enum PeerAffinity {
4848
/// Always attempt to maintain a connection with this Peer.
4949
High,
@@ -54,7 +54,7 @@ pub enum PeerAffinity {
5454
Never,
5555
}
5656

57-
#[derive(Clone, Debug)]
57+
#[derive(Clone, Debug, PartialEq, Eq)]
5858
pub struct PeerInfo {
5959
pub peer_id: PeerId,
6060
pub affinity: PeerAffinity,

0 commit comments

Comments
 (0)