Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unnecessary clones #15

Merged
merged 1 commit into from
May 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion halo2-ecc/src/bls12_381/pairing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ impl<'chip, F: BigPrimeField> PairingChip<'chip, F> {
) -> FqPoint<F> {
let mml = self.multi_miller_loop(ctx, pairs.to_vec());
let fp12_chip = Fp12Chip::<F>::new(self.fp_chip);
let fe = fp12_chip.final_exp(ctx, mml.clone());
let fe = fp12_chip.final_exp(ctx, mml);
fe
}

Expand Down
6 changes: 3 additions & 3 deletions halo2-ecc/src/ecc/hash_to_curve.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,8 @@ pub trait HashToCurveInstructions<
let x_frob = self.field_chip().conjugate(ctx, p.x);
let y_frob = self.field_chip().conjugate(ctx, p.y);

let x = self.field_chip().mul(ctx, x_frob, psi_x.clone());
let y = self.field_chip().mul(ctx, y_frob, psi_y.clone());
let x = self.field_chip().mul(ctx, x_frob, psi_x);
let y = self.field_chip().mul(ctx, y_frob, psi_y);

EcPoint::new(x, y)
}
Expand All @@ -177,7 +177,7 @@ pub trait HashToCurveInstructions<
// 1 / 2 ^ ((q-1)/3)
let psi2_x = self.field_chip().load_constant(ctx, C::PSI2_X);

let x = self.field_chip().mul(ctx, p.x, psi2_x.clone());
let x = self.field_chip().mul(ctx, p.x, psi2_x);
let y = self.field_chip().negate(ctx, p.y);

EcPoint::new(x, y)
Expand Down