From c2e6b9179418f9a01f82359dcff65d80845f0a00 Mon Sep 17 00:00:00 2001 From: Shaopeng Wang Date: Fri, 6 Dec 2019 21:52:42 +1300 Subject: [PATCH] Perthings: derive PartialOrd and Ord under no_std. (#4309) --- substrate/primitives/sr-arithmetic/src/per_things.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/substrate/primitives/sr-arithmetic/src/per_things.rs b/substrate/primitives/sr-arithmetic/src/per_things.rs index ed63039c85..4ab7f2f25a 100644 --- a/substrate/primitives/sr-arithmetic/src/per_things.rs +++ b/substrate/primitives/sr-arithmetic/src/per_things.rs @@ -27,8 +27,8 @@ macro_rules! implement_per_thing { /// A fixed point representation of a number between in the range [0, 1]. /// #[doc = $title] - #[cfg_attr(feature = "std", derive(Serialize, Deserialize, Ord, PartialOrd))] - #[derive(Encode, Decode, Default, Copy, Clone, PartialEq, Eq, RuntimeDebug, CompactAs)] + #[cfg_attr(feature = "std", derive(Serialize, Deserialize))] + #[derive(Encode, Decode, Default, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, RuntimeDebug, CompactAs)] pub struct $name($type); impl $name {