From 7ce927ff7801b1f5144e375f3fa91e20eac855f5 Mon Sep 17 00:00:00 2001 From: collin Date: Tue, 1 Dec 2020 15:43:35 -0500 Subject: [PATCH] remove unused branch --- .../src/statement/assign/circuit_variable.rs | 28 ------------------- 1 file changed, 28 deletions(-) diff --git a/compiler/src/statement/assign/circuit_variable.rs b/compiler/src/statement/assign/circuit_variable.rs index 7574869703..c5d1a0ddcc 100644 --- a/compiler/src/statement/assign/circuit_variable.rs +++ b/compiler/src/statement/assign/circuit_variable.rs @@ -61,34 +61,6 @@ impl> ConstrainedProgram { span.to_owned(), )) } - ConstrainedValue::Mutable(value) => { - // Mutate the circuit variable's value in place - - // Check that the new value type == old value type - new_value.resolve_type(Some(value.to_type(span)?), span)?; - - // Conditionally select the value if this branch is executed. - let mut selected_value = ConstrainedValue::conditionally_select( - cs.ns(|| format!("select {} {}:{}", new_value, span.line, span.start)), - &condition, - &new_value, - &member.1, - ) - .map_err(|_| { - StatementError::select_fail( - new_value.to_string(), - member.1.to_string(), - span.to_owned(), - ) - })?; - - // Make sure the new value is still mutable - selected_value = ConstrainedValue::Mutable(Box::new(selected_value)); - - member.1 = selected_value.to_owned(); - - Ok(selected_value) - } value => { // Check that the new value type == old value type new_value.resolve_type(Some(value.to_type(span)?), span)?;