Merge pull request #181 from 0xPolygonMiden/tohrnii-blake3-ord

feat: derive ord and partialord for blake3digest
This commit is contained in:
Bobbin Threadbare 2023-08-11 13:42:09 -07:00 committed by GitHub
commit 854ade1bfc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -26,7 +26,7 @@ const DIGEST20_BYTES: usize = 20;
///
/// Note: `N` can't be greater than `32` because [`Digest::as_bytes`] currently supports only 32
/// bytes.
#[derive(Debug, Copy, Clone, Eq, PartialEq)]
#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd)]
#[cfg_attr(feature = "serde", derive(serde::Deserialize, serde::Serialize))]
#[cfg_attr(feature = "serde", serde(into = "String", try_from = "&str"))]
pub struct Blake3Digest<const N: usize>([u8; N]);