mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 13:27:57 +00:00
Add CompactAs derive for Fixed* types (#7293)
Signed-off-by: Vladislav Markushin <negigic@gmail.com> Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
//! Decimal Fixed Point implementations for Substrate runtime.
|
||||
|
||||
use sp_std::{ops::{self, Add, Sub, Mul, Div}, fmt::Debug, prelude::*, convert::{TryInto, TryFrom}};
|
||||
use codec::{Encode, Decode};
|
||||
use codec::{Encode, Decode, CompactAs};
|
||||
use crate::{
|
||||
helpers_128bit::multiply_by_rational, PerThing,
|
||||
traits::{
|
||||
@@ -342,7 +342,7 @@ macro_rules! implement_fixed {
|
||||
/// A fixed point number representation in the range.
|
||||
///
|
||||
#[doc = $title]
|
||||
#[derive(Encode, Decode, Default, Copy, Clone, PartialEq, Eq, PartialOrd, Ord)]
|
||||
#[derive(Encode, Decode, CompactAs, Default, Copy, Clone, PartialEq, Eq, PartialOrd, Ord)]
|
||||
pub struct $name($inner_type);
|
||||
|
||||
impl From<$inner_type> for $name {
|
||||
|
||||
Reference in New Issue
Block a user