Skip to content

Commit

Permalink
derive Copy for kbucket::Key
Browse files Browse the repository at this point in the history
  • Loading branch information
drHuangMHT committed Apr 17, 2024
1 parent c92966d commit a550ff8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions protocols/kad/src/kbucket/key.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ construct_uint! {
///
/// `Key`s have an XOR metric as defined in the Kademlia paper, i.e. the bitwise XOR of
/// the hash digests, interpreted as an integer. See [`Key::distance`].
#[derive(Clone, Debug)]
#[derive(Clone, Copy, Debug)]
pub struct Key<T> {
preimage: T,
bytes: KeyBytes,
Expand Down Expand Up @@ -145,7 +145,7 @@ impl<T> Hash for Key<T> {
}

/// The raw bytes of a key in the DHT keyspace.
#[derive(PartialEq, Eq, Clone, Debug)]
#[derive(PartialEq, Eq, Clone, Copy, Debug)]
pub struct KeyBytes(GenericArray<u8, U32>);

impl KeyBytes {
Expand Down

0 comments on commit a550ff8

Please sign in to comment.