Skip to content

Commit

Permalink
Add Eq impl for CircuitProvingKey for consistency with PartialEq
Browse files Browse the repository at this point in the history
  • Loading branch information
vicsn committed Oct 16, 2023
1 parent 07055c3 commit 1bc011e
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ use snarkvm_utilities::{
use std::{cmp::Ordering, sync::Arc};

/// Proving key for a specific circuit (i.e., R1CS matrices).
#[derive(Clone, Debug, Eq)]
#[derive(Clone, Debug)]
pub struct CircuitProvingKey<E: PairingEngine, SM: SNARKMode> {
/// The circuit verifying key.
pub circuit_verifying_key: CircuitVerifyingKey<E>,
Expand Down Expand Up @@ -64,6 +64,8 @@ impl<E: PairingEngine, SM: SNARKMode> PartialEq for CircuitProvingKey<E, SM> {
}
}

impl<E: PairingEngine, SM: SNARKMode> Eq for CircuitProvingKey<E, SM> {}

impl<E: PairingEngine, SM: SNARKMode> Ord for CircuitProvingKey<E, SM> {
fn cmp(&self, other: &Self) -> Ordering {
self.circuit.id.cmp(&other.circuit.id)
Expand Down

0 comments on commit 1bc011e

Please sign in to comment.