clone SecretKey, remove Infallible error type, set_contains arity (#329)
This commit is contained in:
parent
24cafde231
commit
901ba6442c
3 changed files with 8 additions and 3 deletions
|
|
@ -128,6 +128,7 @@ impl SignatureTarget {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
|
||||||
pub struct SecretKey(pub BigUint);
|
pub struct SecretKey(pub BigUint);
|
||||||
|
|
||||||
impl SecretKey {
|
impl SecretKey {
|
||||||
|
|
|
||||||
|
|
@ -39,13 +39,17 @@ pub enum Error {
|
||||||
backtrace: Box<Backtrace>,
|
backtrace: Box<Backtrace>,
|
||||||
},
|
},
|
||||||
#[error(transparent)]
|
#[error(transparent)]
|
||||||
Infallible(#[from] std::convert::Infallible),
|
|
||||||
#[error(transparent)]
|
|
||||||
Backend(#[from] BackendError),
|
Backend(#[from] BackendError),
|
||||||
#[error(transparent)]
|
#[error(transparent)]
|
||||||
Middleware(#[from] crate::middleware::Error),
|
Middleware(#[from] crate::middleware::Error),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl From<std::convert::Infallible> for Error {
|
||||||
|
fn from(value: std::convert::Infallible) -> Self {
|
||||||
|
match value {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl Debug for Error {
|
impl Debug for Error {
|
||||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
std::fmt::Display::fmt(self, f)
|
std::fmt::Display::fmt(self, f)
|
||||||
|
|
|
||||||
|
|
@ -185,7 +185,7 @@ impl Operation {
|
||||||
}
|
}
|
||||||
op_impl_oa!(dict_contains, DictContainsFromEntries, 3);
|
op_impl_oa!(dict_contains, DictContainsFromEntries, 3);
|
||||||
op_impl_oa!(dict_not_contains, DictNotContainsFromEntries, 2);
|
op_impl_oa!(dict_not_contains, DictNotContainsFromEntries, 2);
|
||||||
op_impl_oa!(set_contains, SetContainsFromEntries, 3);
|
op_impl_oa!(set_contains, SetContainsFromEntries, 2);
|
||||||
op_impl_oa!(set_not_contains, SetNotContainsFromEntries, 2);
|
op_impl_oa!(set_not_contains, SetNotContainsFromEntries, 2);
|
||||||
op_impl_oa!(array_contains, ArrayContainsFromEntries, 3);
|
op_impl_oa!(array_contains, ArrayContainsFromEntries, 3);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue