Skip to content

Commit ee8cc66

Browse files
authored
add PartialEq to r1cs::Variable and LinearCombination (dalek-cryptography#271)
1 parent ea08911 commit ee8cc66

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/r1cs/linear_combination.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use std::iter::FromIterator;
55
use std::ops::{Add, Mul, Neg, Sub};
66

77
/// Represents a variable in a constraint system.
8-
#[derive(Copy, Clone, Debug)]
8+
#[derive(Copy, Clone, Debug, PartialEq)]
99
pub enum Variable {
1010
/// Represents an external input specified by a commitment.
1111
Committed(usize),
@@ -106,7 +106,7 @@ impl Mul<Variable> for Scalar {
106106
/// Represents a linear combination of
107107
/// [`Variables`](::r1cs::Variable). Each term is represented by a
108108
/// `(Variable, Scalar)` pair.
109-
#[derive(Clone, Debug)]
109+
#[derive(Clone, Debug, PartialEq)]
110110
pub struct LinearCombination {
111111
pub(super) terms: Vec<(Variable, Scalar)>,
112112
}

0 commit comments

Comments
 (0)