Skip to content

Commit

Permalink
feat: don't untrack cells inside builder
Browse files Browse the repository at this point in the history
  • Loading branch information
Rexagon committed Jul 1, 2024
1 parent 182de99 commit 491a0b9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/cell/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -869,7 +869,7 @@ impl CellBuilder {
pub fn store_reference(&mut self, cell: Cell) -> Result<(), Error> {
if self.references.len() < MAX_REF_COUNT {
// SAFETY: reference count is in the valid range
unsafe { self.references.push(cell.untrack()) }
unsafe { self.references.push(cell) }
Ok(())
} else {
Err(Error::CellOverflow)
Expand Down Expand Up @@ -1055,7 +1055,7 @@ impl CellRefsBuilder {
pub fn store_reference(&mut self, cell: Cell) -> Result<(), Error> {
if self.0.len() < MAX_REF_COUNT {
// SAFETY: reference count is in the valid range
unsafe { self.0.push(cell.untrack()) }
unsafe { self.0.push(cell) }
Ok(())
} else {
Err(Error::CellOverflow)
Expand Down

0 comments on commit 491a0b9

Please sign in to comment.