clippy: remove a few redundant clones

Signed-off-by: ljedrz <ljedrz@gmail.com>
This commit is contained in:
ljedrz 2020-10-21 11:14:27 +02:00
parent 4f298510f9
commit 5e4f799685
2 changed files with 2 additions and 9 deletions

View File

@ -36,14 +36,7 @@ impl<F: Field + PrimeField, G: GroupType<F>> ConstrainedProgram<F, G> {
index: RangeOrExpression,
span: &Span,
) -> Result<ConstrainedValue<F, G>, ExpressionError> {
let array = match self.enforce_operand(
cs,
file_scope.clone(),
function_scope.clone(),
expected_type,
array,
span,
)? {
let array = match self.enforce_operand(cs, file_scope, function_scope, expected_type, array, span)? {
ConstrainedValue::Array(array) => array,
value => return Err(ExpressionError::undefined_array(value.to_string(), span.to_owned())),
};

View File

@ -42,7 +42,7 @@ impl<F: Field + PrimeField, G: GroupType<F>> ConstrainedProgram<F, G> {
// Save a reference to the circuit we are mutating.
let circuit_id_string = circuit_identifier.to_string();
let declared_circuit_reference = new_scope(function_scope.clone(), &circuit_id_string);
let declared_circuit_reference = new_scope(function_scope, &circuit_id_string);
(
declared_circuit_reference,