Skip to content

Commit

Permalink
refactor: make peer id vendor a static reference without this it will…
Browse files Browse the repository at this point in the history
  • Loading branch information
pnicto committed Feb 16, 2024
1 parent 9a17b75 commit 114dd95
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tracker/request.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ pub struct PeerId([u8; Self::PEER_ID_SIZE]);

impl PeerId {
pub const PEER_ID_SIZE: usize = 20;
pub const PEER_ID_VENDOR_PREFIX: &[u8; 8] = b"-CX0000-";
pub const PEER_ID_VENDOR_PREFIX: &'static [u8; 8] = b"-CX0000-";
const PREFIX_LEN: usize = Self::PEER_ID_VENDOR_PREFIX.len();
const SUFFIX_LEN: usize = Self::PEER_ID_SIZE - Self::PREFIX_LEN;

Expand Down

0 comments on commit 114dd95

Please sign in to comment.