mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-08 12:19:24 +00:00
Add PartialEq to structs
This commit is contained in:
@@ -17,6 +17,12 @@ pub trait Transcript {
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct DigestTranscript<D: Digest>(Vec<u8>, PhantomData<D>);
|
||||
|
||||
impl<D: Digest> PartialEq for DigestTranscript<D> {
|
||||
fn eq(&self, other: &DigestTranscript<D>) -> bool {
|
||||
self.0 == other.0
|
||||
}
|
||||
}
|
||||
|
||||
impl<D: Digest> DigestTranscript<D> {
|
||||
pub fn new(label: Vec<u8>) -> Self {
|
||||
DigestTranscript(label, PhantomData)
|
||||
|
||||
Reference in New Issue
Block a user