summaryrefslogtreecommitdiffstats
path: root/openpgp/src/types/mod.rs
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2020-09-29 11:54:26 +0200
committerJustus Winter <justus@sequoia-pgp.org>2020-09-29 12:02:52 +0200
commit5beeeeb1989155489687c3a13f6592581ae8d7ce (patch)
treefbfe67f713059b6a94f94354602e398ee48f9774 /openpgp/src/types/mod.rs
parentc84afa6db3f9605d9c763b07484c78fab7bc659f (diff)
openpgp: Implement PartialOrd, Ord for signature-related types.
- In order to deduplicate signatures, we need to be able to sort them. This change implements PartialOrd and Ord for all relevant types. Like PartialEq and Eq it is based on the serialized form, and can be derived for most of the types.
Diffstat (limited to 'openpgp/src/types/mod.rs')
-rw-r--r--openpgp/src/types/mod.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/openpgp/src/types/mod.rs b/openpgp/src/types/mod.rs
index cf3b4568..928b0d20 100644
--- a/openpgp/src/types/mod.rs
+++ b/openpgp/src/types/mod.rs
@@ -1112,7 +1112,7 @@ impl Arbitrary for HashAlgorithm {
/// .set_signature_creation_time(SystemTime::now())?;
/// # Ok(()) }
/// ```
-#[derive(Clone, Copy, Hash, PartialEq, Eq, Debug)]
+#[derive(Clone, Copy, Hash, PartialEq, Eq, PartialOrd, Ord, Debug)]
pub enum SignatureType {
/// Signature over a binary document.
Binary,