From 8d57cce7c20b4f01736ab01c18c8fbc1cb9a4d3d Mon Sep 17 00:00:00 2001 From: Alireza Shirzad Date: Thu, 28 Nov 2024 11:52:38 -0500 Subject: [PATCH] refactor: update make_row method to improve error handling and clarity --- relations/src/gr1cs/constraint_system_ref.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/relations/src/gr1cs/constraint_system_ref.rs b/relations/src/gr1cs/constraint_system_ref.rs index 30f839324..a7f2b4ed1 100644 --- a/relations/src/gr1cs/constraint_system_ref.rs +++ b/relations/src/gr1cs/constraint_system_ref.rs @@ -339,11 +339,11 @@ impl ConstraintSystemRef { .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) -> crate::utils::Result> { 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