Skip to content

Commit

Permalink
feat: derive MEL for Value enum (#867)
Browse files Browse the repository at this point in the history
* feat: impl MEL for Value enum

* fmt: fix
  • Loading branch information
wischli authored Jan 10, 2023
1 parent 79d7cdd commit 04e67e6
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions traits/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
#![cfg_attr(not(feature = "std"), no_std)]

use codec::{Decode, Encode};
use codec::{Decode, Encode, MaxEncodedLen};
use impl_trait_for_tuples::impl_for_tuples;
use sp_runtime::{DispatchResult, RuntimeDebug};
use sp_std::{
cmp::{Eq, PartialEq},
prelude::Vec,
};

#[cfg(feature = "std")]
use serde::{Deserialize, Serialize};

pub use asset_registry::{FixedConversionRateProvider, WeightToFeeConverter};
pub use auction::{Auction, AuctionHandler, AuctionInfo, OnNewBidResult};
pub use currency::{
Expand All @@ -25,6 +22,8 @@ pub use nft::InspectExtended;
pub use price::{DefaultPriceProvider, PriceProvider};
pub use rewards::RewardHandler;
use scale_info::TypeInfo;
#[cfg(feature = "std")]
use serde::{Deserialize, Serialize};
pub use xcm_transfer::XcmTransfer;

pub mod arithmetic;
Expand Down Expand Up @@ -58,7 +57,7 @@ pub trait CombineData<Key, TimestampedValue> {
}

/// Indicate if should change a value
#[derive(Encode, Decode, Clone, Eq, PartialEq, RuntimeDebug, TypeInfo)]
#[derive(Encode, Decode, Clone, Eq, PartialEq, RuntimeDebug, TypeInfo, MaxEncodedLen)]
pub enum Change<Value> {
/// No change.
NoChange,
Expand Down

0 comments on commit 04e67e6

Please sign in to comment.