mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 20:27:58 +00:00
Add FixedPointOperand blanket implementation (#14634)
* bound `Balance` to `FixedPointOperand` * ".git/.scripts/commands/fmt/fmt.sh" * clean up code * Apply suggestions from code review Co-authored-by: Gavin Wood <gavin@parity.io> * wip * add blanket `FixedPointOperand` impl * update nis CurrencyBalance * remove CheckedNeg bound --------- Co-authored-by: command-bot <> Co-authored-by: Gavin Wood <gavin@parity.io>
This commit is contained in:
@@ -52,16 +52,18 @@ pub trait FixedPointOperand:
|
||||
{
|
||||
}
|
||||
|
||||
impl FixedPointOperand for i128 {}
|
||||
impl FixedPointOperand for u128 {}
|
||||
impl FixedPointOperand for i64 {}
|
||||
impl FixedPointOperand for u64 {}
|
||||
impl FixedPointOperand for i32 {}
|
||||
impl FixedPointOperand for u32 {}
|
||||
impl FixedPointOperand for i16 {}
|
||||
impl FixedPointOperand for u16 {}
|
||||
impl FixedPointOperand for i8 {}
|
||||
impl FixedPointOperand for u8 {}
|
||||
impl<T> FixedPointOperand for T where
|
||||
T: Copy
|
||||
+ Clone
|
||||
+ Bounded
|
||||
+ Zero
|
||||
+ Saturating
|
||||
+ PartialOrd
|
||||
+ UniqueSaturatedInto<u128>
|
||||
+ TryFrom<u128>
|
||||
+ CheckedNeg
|
||||
{
|
||||
}
|
||||
|
||||
/// Something that implements a decimal fixed point number.
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user