From 73cee467228f07a26a6e3321283b348c052fd066 Mon Sep 17 00:00:00 2001 From: "dustin.ray" Date: Tue, 7 Jan 2025 08:51:15 -0800 Subject: [PATCH] fix: slice copy --- crates/proof-of-sql/src/sql/proof_gadgets/range_check.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/proof-of-sql/src/sql/proof_gadgets/range_check.rs b/crates/proof-of-sql/src/sql/proof_gadgets/range_check.rs index b4839f616..224e86b2a 100644 --- a/crates/proof-of-sql/src/sql/proof_gadgets/range_check.rs +++ b/crates/proof-of-sql/src/sql/proof_gadgets/range_check.rs @@ -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. @@ -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 {