Skip to content

Commit

Permalink
chore: clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
huitseeker committed Jan 6, 2024
1 parent 0c1cd8c commit 62b76f2
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 8 deletions.
1 change: 1 addition & 0 deletions .augre/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
openai_key="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"
2 changes: 1 addition & 1 deletion benches/synthesis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ fn synthesize<M: measurement::Measurement>(
Arc::new(FoldingConfig::new_ivc(lang_rc.clone(), *reduction_count));

let multiframe =
MultiFrame::from_frames(&frames, &store, folding_config.clone())[0].clone();
MultiFrame::from_frames(&frames, &store, &folding_config)[0].clone();

b.iter_batched(
|| (multiframe.clone()), // avoid cloning the frames in the benchmark
Expand Down
6 changes: 3 additions & 3 deletions src/lem/circuit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -899,9 +899,9 @@ fn synthesize_block<F: LurkField, CS: ConstraintSystem<F>, C: Coprocessor<F>>(
);

// The number is negative if the least significant bit of its double is 1
let a_is_negative = double_a_bits.get(0).unwrap();
let b_is_negative = double_b_bits.get(0).unwrap();
let diff_is_negative = double_diff_bits.get(0).unwrap();
let a_is_negative = double_a_bits.first().unwrap();
let b_is_negative = double_b_bits.first().unwrap();
let diff_is_negative = double_diff_bits.first().unwrap();

// Two numbers have the same sign if both are negative or both are positive, i.e.
let same_sign =
Expand Down
6 changes: 3 additions & 3 deletions src/lem/multiframe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -195,12 +195,12 @@ impl<'a, F: LurkField, C: Coprocessor<F>> MultiFrame<'a, F, C> {
pub fn from_frames(
frames: &[Frame],
store: &'a Store<F>,
folding_config: Arc<FoldingConfig<F, C>>,
folding_config: &Arc<FoldingConfig<F, C>>,
) -> Vec<Self> {
let reduction_count = folding_config.reduction_count();
let mut multi_frames =
Vec::with_capacity((frames.len() + reduction_count - 1) / reduction_count);
match &*folding_config {
match folding_config.as_ref() {
FoldingConfig::IVC(lang, _) => {
let lurk_step = Arc::new(make_eval_step_from_config(&EvalConfig::new_ivc(lang)));
for chunk in frames.chunks(reduction_count) {
Expand Down Expand Up @@ -1088,7 +1088,7 @@ mod tests {
let folding_config = Arc::new(FoldingConfig::new_ivc(lang.clone(), 1));

store.hydrate_z_cache();
MultiFrame::from_frames(&[frame], &store, folding_config)
MultiFrame::from_frames(&[frame], &store, &folding_config)
.pop()
.unwrap()
.synthesize(&mut cs)
Expand Down
2 changes: 1 addition & 1 deletion src/proof/tests/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ where
.synthesize(&mut cs_blank)
.expect("failed to synthesize blank");

for (_i, multiframe) in multiframes.iter().enumerate() {
for multiframe in multiframes.iter() {
let mut cs = TestConstraintSystem::new();
let mut wcs = WitnessCS::new();

Expand Down

0 comments on commit 62b76f2

Please sign in to comment.