summaryrefslogtreecommitdiffstats
path: root/vendor/der/src/ord.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 03:57:31 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 03:57:31 +0000
commitdc0db358abe19481e475e10c32149b53370f1a1c (patch)
treeab8ce99c4b255ce46f99ef402c27916055b899ee /vendor/der/src/ord.rs
parentReleasing progress-linux version 1.71.1+dfsg1-2~progress7.99u1. (diff)
downloadrustc-dc0db358abe19481e475e10c32149b53370f1a1c.tar.xz
rustc-dc0db358abe19481e475e10c32149b53370f1a1c.zip
Merging upstream version 1.72.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/der/src/ord.rs')
-rw-r--r--vendor/der/src/ord.rs16
1 files changed, 15 insertions, 1 deletions
diff --git a/vendor/der/src/ord.rs b/vendor/der/src/ord.rs
index fd967bf88..42d462340 100644
--- a/vendor/der/src/ord.rs
+++ b/vendor/der/src/ord.rs
@@ -1,7 +1,7 @@
//! Ordering trait.
use crate::{EncodeValue, Result, Tagged};
-use core::cmp::Ordering;
+use core::{cmp::Ordering, marker::PhantomData};
/// DER ordering trait.
///
@@ -69,3 +69,17 @@ where
Ok(length_ord)
}
+
+/// Provide a no-op implementation for PhantomData
+impl<T> ValueOrd for PhantomData<T> {
+ fn value_cmp(&self, _other: &Self) -> Result<Ordering> {
+ Ok(Ordering::Equal)
+ }
+}
+
+/// Provide a no-op implementation for PhantomData
+impl<T> DerOrd for PhantomData<T> {
+ fn der_cmp(&self, _other: &Self) -> Result<Ordering> {
+ Ok(Ordering::Equal)
+ }
+}