Skip to content

Commit

Permalink
chore: update README and make clippy happy
Browse files Browse the repository at this point in the history
  • Loading branch information
curryrasul committed Aug 23, 2024
1 parent b2ebc88 commit 46d1725
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ This library enables the creation of arithmetic circuits from circom programs.
| | `PrefixOp` ||
| | `InlineSwitchOp` ||
| | `ParallelOp` ||
| | `AnonymousComp` | |
| | `AnonymousComp` | |
| | `ArrayInLine` ||
| | `Tuple` | |
| | `Tuple` | |
| | `UniformArray` ||

## Circomlib
Expand Down
12 changes: 7 additions & 5 deletions tests/integration.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![allow(clippy::upper_case_acronyms)]

use circom_2_arithc::arithmetic_circuit::{
AGateType, ArithmeticCircuit as CompilerArithmeticCircuit,
};
Expand Down Expand Up @@ -229,7 +231,7 @@ impl ArithmeticCircuit {
.get(label)
.ok_or("Output label not found")
.unwrap();
(label.clone(), output.get(index).unwrap().clone())
(label.clone(), *output.get(index).unwrap())
})
.collect();

Expand Down Expand Up @@ -270,7 +272,7 @@ mod integration_tests {
let outputs: HashMap<String, u32> = arithmetic_circuit.run(input_map).unwrap();

for (label, expected_value) in expected_outputs {
let value = outputs.get(&label.to_string()).unwrap();
let value = outputs.get(*label).unwrap();
assert_eq!(value, expected_value);
}
}
Expand Down Expand Up @@ -380,7 +382,7 @@ mod integration_tests {
);
let circuit = compile(&compiler_input);

assert_eq!(circuit.is_err(), true);
assert!(circuit.is_err());
assert_eq!(
circuit.unwrap_err().to_string(),
"Runtime error: Index out of bounds"
Expand All @@ -395,7 +397,7 @@ mod integration_tests {
);
let circuit_res = compile(&compiler_input);

assert_eq!(circuit_res.is_ok(), true);
assert!(circuit_res.is_ok());

let circuit = circuit_res.unwrap().build_circuit().unwrap();

Expand All @@ -417,7 +419,7 @@ mod integration_tests {
);
let circuit_res = compile(&compiler_input);

assert_eq!(circuit_res.is_ok(), true);
assert!(circuit_res.is_ok());

let circuit = circuit_res.unwrap().build_circuit().unwrap();

Expand Down

0 comments on commit 46d1725

Please sign in to comment.