Skip to content

Commit

Permalink
Merge pull request #364 from Chia-Network/nodeptr-assert
Browse files Browse the repository at this point in the history
demote assert to debug_assert in NodePtr constructor
  • Loading branch information
arvidn authored Jan 12, 2024
2 parents 4a2a4f9 + a03b2df commit 1cd97a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/allocator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ impl NodePtr {
pub const NIL: Self = Self::new(ObjectType::Bytes, 0);

const fn new(t: ObjectType, idx: usize) -> Self {
assert!(idx <= NODE_PTR_IDX_MASK as usize);
debug_assert!(idx <= NODE_PTR_IDX_MASK as usize);
NodePtr(((t as u32) << NODE_PTR_IDX_BITS) | (idx as u32))
}

Expand Down

0 comments on commit 1cd97a3

Please sign in to comment.