From 827534329f3ff61f9212f7933ed1688fa04e987c Mon Sep 17 00:00:00 2001 From: Kris Nuttycombe Date: Wed, 20 Mar 2024 11:39:06 -0600 Subject: [PATCH] Derive `{PartialOrd, Ord}` for `note::Nullifier` --- CHANGELOG.md | 3 +++ src/note/nullifier.rs | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b49d725..de62828 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,9 @@ and this library adheres to Rust's notion of ## [Unreleased] +### Added +- `impl {PartialOrd, Ord} for sapling_crypto::note::Nullifier` + ## [0.1.2] - 2024-03-08 ### Added - `sapling_crypto::zip32::IncomingViewingKey` diff --git a/src/note/nullifier.rs b/src/note/nullifier.rs index 938b294..8176f40 100644 --- a/src/note/nullifier.rs +++ b/src/note/nullifier.rs @@ -10,7 +10,7 @@ use crate::{ }; /// Typesafe wrapper for nullifier values. -#[derive(Copy, Clone, PartialEq, Eq)] +#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord)] pub struct Nullifier(pub [u8; 32]); impl fmt::Debug for Nullifier {