Skip to content

Commit

Permalink
fix: slice copy
Browse files Browse the repository at this point in the history
  • Loading branch information
Dustin-Ray committed Jan 7, 2025
1 parent be1d27b commit 73cee46
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/proof-of-sql/src/sql/proof_gadgets/range_check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ pub fn final_round_evaluate_range_check<'a, S: Scalar + 'a>(
// 31 because a scalar will only ever have 248 bits of data set.
let mut word_columns: Vec<&mut [u8]> = repeat(())
.take(31)
.map(|()| alloc.alloc_slice_fill_with(scalars.len(), |_| 0))
.map(|()| alloc.alloc_slice_fill_copy(scalars.len(), 0))
.collect();

// Allocate space for the eventual inverted word columns by copying word_columns and converting to the required type.
Expand Down Expand Up @@ -321,7 +321,7 @@ fn prove_row_zero_sum<'a, S: Scalar + 'a>(
builder.produce_intermediate_mle(word_counts as &[_]);

// Allocate row_sums from the bump allocator, ensuring it lives as long as 'a
let row_sums = alloc.alloc_slice_fill_with(scalars.len(), |_| S::ZERO);
let row_sums = alloc.alloc_slice_fill_copy(scalars.len(), S::ZERO);

// Sum up the corresponding row values using iterators
for column in inverted_word_columns {
Expand Down

0 comments on commit 73cee46

Please sign in to comment.