We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 86baf66 commit be752baCopy full SHA for be752ba
der/src/ord.rs
@@ -1,7 +1,7 @@
1
//! Ordering trait.
2
3
use crate::{EncodeValue, Result, Tagged};
4
-use core::cmp::Ordering;
+use core::{cmp::Ordering, marker::PhantomData};
5
6
/// DER ordering trait.
7
///
@@ -69,3 +69,17 @@ where
69
70
Ok(length_ord)
71
}
72
+
73
+/// Provide a no-op implementation for PhantomData
74
+impl<T> ValueOrd for PhantomData<T> {
75
+ fn value_cmp(&self, _other: &Self) -> Result<Ordering> {
76
+ Ok(Ordering::Equal)
77
+ }
78
+}
79
80
81
+impl<T> DerOrd for PhantomData<T> {
82
+ fn der_cmp(&self, _other: &Self) -> Result<Ordering> {
83
84
85
0 commit comments