Skip to content

Commit

Permalink
refactor: update make_row method to improve error handling and clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
alireza-shirzad committed Nov 28, 2024
1 parent 8e6585d commit 8d57cce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions relations/src/gr1cs/constraint_system_ref.rs
Original file line number Diff line number Diff line change
Expand Up @@ -339,11 +339,11 @@ impl<F: Field> ConstraintSystemRef<F> {
.and_then(|cs| cs.borrow().get_lc(lc_index))
}


/// Given a linear combination, create a row in the matrix
pub fn make_row(&self, lc: &LinearCombination<F>) -> crate::utils::Result<Vec<(F, usize)>> {
self.inner()
.ok_or(SynthesisError::MissingCS)
.and_then(|cs| Ok(cs.borrow().make_row(lc)))
.map(|cs| cs.borrow().make_row(lc))
}

// TODO: Implement this function
Expand Down

0 comments on commit 8d57cce

Please sign in to comment.