Skip to content

Commit

Permalink
demote assert to debug_assert in NodePtr constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
arvidn committed Jan 12, 2024
1 parent 4a2a4f9 commit a03b2df
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 a03b2df

Please sign in to comment.