From 26d796d708ee3d157c4e62cdda36ee688e6547a0 Mon Sep 17 00:00:00 2001 From: Bryan Chen Date: Thu, 22 Jul 2021 21:28:06 +1200 Subject: [PATCH 1/2] add CheckedRem --- primitives/arithmetic/src/traits.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/primitives/arithmetic/src/traits.rs b/primitives/arithmetic/src/traits.rs index a441a0dcbc08d..15da0b5d74a8f 100644 --- a/primitives/arithmetic/src/traits.rs +++ b/primitives/arithmetic/src/traits.rs @@ -20,8 +20,8 @@ use codec::HasCompact; pub use integer_sqrt::IntegerSquareRoot; pub use num_traits::{ - checked_pow, Bounded, CheckedAdd, CheckedDiv, CheckedMul, CheckedNeg, CheckedShl, CheckedShr, - CheckedSub, One, Signed, Unsigned, Zero, + checked_pow, Bounded, CheckedAdd, CheckedDiv, CheckedMul, CheckedNeg, CheckedRem, CheckedShl, + CheckedShr, CheckedSub, One, Signed, Unsigned, Zero, }; use sp_std::{ self, @@ -55,6 +55,7 @@ pub trait BaseArithmetic: + CheckedSub + CheckedMul + CheckedDiv + + CheckedRem + Saturating + PartialOrd + Ord From c0b2a6f1f6a9d935d193c506cc7004842f4a992c Mon Sep 17 00:00:00 2001 From: Bryan Chen Date: Thu, 22 Jul 2021 22:27:33 +1200 Subject: [PATCH 2/2] fix --- primitives/arithmetic/src/traits.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/primitives/arithmetic/src/traits.rs b/primitives/arithmetic/src/traits.rs index 15da0b5d74a8f..53341117b1fee 100644 --- a/primitives/arithmetic/src/traits.rs +++ b/primitives/arithmetic/src/traits.rs @@ -110,6 +110,7 @@ impl< + CheckedSub + CheckedMul + CheckedDiv + + CheckedRem + Saturating + PartialOrd + Ord