mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-06 16:07:21 +00:00
Use EncodeLike for storages traits (#3676)
* impl * patch * lock * some refactor * some avoided copy * new api without ref for doublemap * fix * version bump * fix * point to incoming release * use codec latest * bumpd impl version * fix unused * fix * Update srml/support/src/storage/mod.rs Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com>
This commit is contained in:
committed by
Bastian Köcher
parent
83d4764d46
commit
53e0ddee4e
@@ -19,7 +19,7 @@
|
||||
//! NOTE: If you're looking for `parameter_types`, it has moved in to the top-level module.
|
||||
|
||||
use rstd::{prelude::*, result, marker::PhantomData, ops::Div};
|
||||
use codec::{Codec, Encode, Decode};
|
||||
use codec::{FullCodec, Codec, Encode, Decode};
|
||||
use primitives::u32_trait::Value as U32;
|
||||
use sr_primitives::{
|
||||
ConsensusEngineId,
|
||||
@@ -254,7 +254,7 @@ pub enum SignedImbalance<B, P: Imbalance<B>>{
|
||||
impl<
|
||||
P: Imbalance<B, Opposite=N>,
|
||||
N: Imbalance<B, Opposite=P>,
|
||||
B: SimpleArithmetic + Codec + Copy + MaybeSerializeDebug + Default,
|
||||
B: SimpleArithmetic + FullCodec + Copy + MaybeSerializeDebug + Default,
|
||||
> SignedImbalance<B, P> {
|
||||
pub fn zero() -> Self {
|
||||
SignedImbalance::Positive(P::zero())
|
||||
@@ -317,7 +317,7 @@ impl<
|
||||
/// Abstraction over a fungible assets system.
|
||||
pub trait Currency<AccountId> {
|
||||
/// The balance of an account.
|
||||
type Balance: SimpleArithmetic + Codec + Copy + MaybeSerializeDebug + Default;
|
||||
type Balance: SimpleArithmetic + FullCodec + Copy + MaybeSerializeDebug + Default;
|
||||
|
||||
/// The opaque token type for an imbalance. This is returned by unbalanced operations
|
||||
/// and must be dealt with. It may be dropped but cannot be cloned.
|
||||
@@ -615,7 +615,7 @@ bitmask! {
|
||||
}
|
||||
|
||||
pub trait Time {
|
||||
type Moment: SimpleArithmetic + Codec + Clone + Default + Copy;
|
||||
type Moment: SimpleArithmetic + FullCodec + Clone + Default + Copy;
|
||||
|
||||
fn now() -> Self::Moment;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user