Skip to content

Commit 901ba64

Browse files
authored
clone SecretKey, remove Infallible error type, set_contains arity (#329)
1 parent 24cafde commit 901ba64

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

src/backends/plonky2/primitives/ec/schnorr.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ impl SignatureTarget {
128128
}
129129
}
130130

131+
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
131132
pub struct SecretKey(pub BigUint);
132133

133134
impl SecretKey {

src/frontend/error.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,17 @@ pub enum Error {
3939
backtrace: Box<Backtrace>,
4040
},
4141
#[error(transparent)]
42-
Infallible(#[from] std::convert::Infallible),
43-
#[error(transparent)]
4442
Backend(#[from] BackendError),
4543
#[error(transparent)]
4644
Middleware(#[from] crate::middleware::Error),
4745
}
4846

47+
impl From<std::convert::Infallible> for Error {
48+
fn from(value: std::convert::Infallible) -> Self {
49+
match value {}
50+
}
51+
}
52+
4953
impl Debug for Error {
5054
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
5155
std::fmt::Display::fmt(self, f)

src/frontend/operation.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ impl Operation {
185185
}
186186
op_impl_oa!(dict_contains, DictContainsFromEntries, 3);
187187
op_impl_oa!(dict_not_contains, DictNotContainsFromEntries, 2);
188-
op_impl_oa!(set_contains, SetContainsFromEntries, 3);
188+
op_impl_oa!(set_contains, SetContainsFromEntries, 2);
189189
op_impl_oa!(set_not_contains, SetNotContainsFromEntries, 2);
190190
op_impl_oa!(array_contains, ArrayContainsFromEntries, 3);
191191
}

0 commit comments

Comments
 (0)