Skip to content

Commit

Permalink
fmt and fix ci
Browse files Browse the repository at this point in the history
  • Loading branch information
siq1 committed Sep 10, 2024
1 parent eee73d5 commit 58c05d3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
13 changes: 4 additions & 9 deletions expander_compiler/src/layering/ir_split.rs
Original file line number Diff line number Diff line change
Expand Up @@ -211,12 +211,7 @@ impl<'a, C: Config> SplitContext<'a, C> {
)
}

fn split_circuit(
&mut self,
circuit_id: usize,
input_layers: Vec<usize>,
split_at: &Vec<usize>,
) {
fn split_circuit(&mut self, circuit_id: usize, input_layers: Vec<usize>, split_at: &[usize]) {
let pre_split_at = split_at;
let mut split_at_set: HashSet<usize> = split_at.iter().cloned().collect();
for x in input_layers.iter() {
Expand Down Expand Up @@ -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],
Expand All @@ -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),
});
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 58c05d3

Please sign in to comment.