diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 54d7c86..dd3b540 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -92,7 +92,7 @@ jobs: cd ecgo go test ./test/ - test-go-keccak-serve: + test-go-keccak-full: runs-on: 7950x3d needs: build-rust steps: diff --git a/expander_compiler/src/layering/ir_split.rs b/expander_compiler/src/layering/ir_split.rs index 86b34da..0792e1c 100644 --- a/expander_compiler/src/layering/ir_split.rs +++ b/expander_compiler/src/layering/ir_split.rs @@ -211,12 +211,7 @@ impl<'a, C: Config> SplitContext<'a, C> { ) } - fn split_circuit( - &mut self, - circuit_id: usize, - input_layers: Vec, - split_at: &Vec, - ) { + fn split_circuit(&mut self, circuit_id: usize, input_layers: Vec, split_at: &[usize]) { let pre_split_at = split_at; let mut split_at_set: HashSet = split_at.iter().cloned().collect(); for x in input_layers.iter() { @@ -256,7 +251,7 @@ impl<'a, C: Config> SplitContext<'a, C> { )); j += 1; } - while circuit_id == 0 && add_outputs.len() > 0 { + while circuit_id == 0 && !add_outputs.is_empty() { terms.push(Term::new_linear( C::CircuitField::one(), add_outputs[add_outputs.len() - 1], @@ -267,7 +262,7 @@ impl<'a, C: Config> SplitContext<'a, C> { terms.push(Term::new_random_linear(constraints[k])); k += 1; } - if terms.len() > 0 { + if !terms.is_empty() { circuit.instructions.push(Instruction::InternalVariable { expr: Expression::from_terms(terms), }); @@ -440,7 +435,7 @@ impl<'a, C: Config> SplitContext<'a, C> { }); } self.splitted_circuits.insert( - (circuit_id, input_layers, pre_split_at.clone()), + (circuit_id, input_layers, pre_split_at.to_owned()), SplittedCircuit { segments, outputs: outputs