Skip to content

Commit

Permalink
bier: Apply bitmask on BiftId creation rather than retrieval
Browse files Browse the repository at this point in the history
Signed-off-by: Nicolas Rybowski <[email protected]>
  • Loading branch information
nrybowski committed Sep 9, 2024
1 parent 00dce3a commit 226f141
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions holo-utils/src/bier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ impl BiftId {
pub const VALUE_MASK: u32 = 0x000FFFFF;

pub fn new(bift_id: u32) -> Self {
Self(bift_id)
Self(bift_id & Self::VALUE_MASK)
}

pub fn get(&self) -> u32 {
self.0 & Self::VALUE_MASK
self.0
}
}

Expand Down

0 comments on commit 226f141

Please sign in to comment.