diff --git a/single_use_seals/src/lib.rs b/single_use_seals/src/lib.rs index 72b00e34..1037fac6 100644 --- a/single_use_seals/src/lib.rs +++ b/single_use_seals/src/lib.rs @@ -166,7 +166,7 @@ pub trait SingleUseSeal: fn is_included(&self, message: Self::Message, witness: &SealWitness) -> bool; } -pub trait ClientSideWitness { +pub trait ClientSideWitness: Eq { /// Client-side witness is specific to just one type of single-use seals, /// provided as an associated type. type Seal: SingleUseSeal; @@ -181,8 +181,14 @@ pub trait ClientSideWitness { ) -> Result; } -#[derive(Copy, Clone, Ord, PartialOrd, Eq, PartialEq, Hash, Debug, Default)] +#[derive(Copy, Clone, Debug, Default)] pub struct NoWitness(PhantomData); + +impl PartialEq for NoWitness { + fn eq(&self, _: &Self) -> bool { true } +} +impl Eq for NoWitness {} + impl ClientSideWitness for NoWitness { type Seal = Seal; type Proof = Seal::Message;