Skip to content
Snippets Groups Projects
Unverified Commit bfbdf5df authored by wangjj9219's avatar wangjj9219 Committed by GitHub
Browse files

impl Ord and PartialOrd for TimestampedValue (#268)

parent be6d84f1
No related branches found
No related tags found
No related merge requests found
...@@ -44,7 +44,7 @@ use sp_std::{prelude::*, vec}; ...@@ -44,7 +44,7 @@ use sp_std::{prelude::*, vec};
type MomentOf<T, I = DefaultInstance> = <<T as Trait<I>>::Time as Time>::Moment; type MomentOf<T, I = DefaultInstance> = <<T as Trait<I>>::Time as Time>::Moment;
pub type TimestampedValueOf<T, I = DefaultInstance> = TimestampedValue<<T as Trait<I>>::OracleValue, MomentOf<T, I>>; pub type TimestampedValueOf<T, I = DefaultInstance> = TimestampedValue<<T as Trait<I>>::OracleValue, MomentOf<T, I>>;
#[derive(Encode, Decode, RuntimeDebug, Eq, PartialEq, Clone, Copy)] #[derive(Encode, Decode, RuntimeDebug, Eq, PartialEq, Clone, Copy, Ord, PartialOrd)]
#[cfg_attr(feature = "std", derive(Serialize, Deserialize))] #[cfg_attr(feature = "std", derive(Serialize, Deserialize))]
pub struct TimestampedValue<Value, Moment> { pub struct TimestampedValue<Value, Moment> {
pub value: Value, pub value: Value,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment