mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-20 23:15:42 +00:00
Remove unneeded cruft (#3368)
This commit is contained in:
@@ -25,7 +25,7 @@ use sr_primitives::weights::SimpleDispatchInfo;
|
|||||||
use codec::{Encode, Decode, Input, Output, Error};
|
use codec::{Encode, Decode, Input, Output, Error};
|
||||||
use srml_support::{
|
use srml_support::{
|
||||||
decl_module, decl_storage, decl_event, ensure,
|
decl_module, decl_storage, decl_event, ensure,
|
||||||
StorageValue, StorageMap, Parameter, Dispatchable, IsSubType, EnumerableStorageMap,
|
StorageValue, StorageMap, Parameter, Dispatchable, EnumerableStorageMap,
|
||||||
traits::{
|
traits::{
|
||||||
Currency, ReservableCurrency, LockableCurrency, WithdrawReason, LockIdentifier,
|
Currency, ReservableCurrency, LockableCurrency, WithdrawReason, LockIdentifier,
|
||||||
OnFreeBalanceZero, Get
|
OnFreeBalanceZero, Get
|
||||||
@@ -182,7 +182,7 @@ pub const DEFAULT_EMERGENCY_VOTING_PERIOD: u32 = 0;
|
|||||||
pub const DEFAULT_COOLOFF_PERIOD: u32 = 0;
|
pub const DEFAULT_COOLOFF_PERIOD: u32 = 0;
|
||||||
|
|
||||||
pub trait Trait: system::Trait + Sized {
|
pub trait Trait: system::Trait + Sized {
|
||||||
type Proposal: Parameter + Dispatchable<Origin=Self::Origin> + IsSubType<Module<Self>, Self>;
|
type Proposal: Parameter + Dispatchable<Origin=Self::Origin>;
|
||||||
type Event: From<Event<Self>> + Into<<Self as system::Trait>::Event>;
|
type Event: From<Event<Self>> + Into<<Self as system::Trait>::Event>;
|
||||||
|
|
||||||
/// Currency type for this module.
|
/// Currency type for this module.
|
||||||
|
|||||||
@@ -1264,7 +1264,7 @@ macro_rules! decl_module {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub trait IsSubType<T: Callable<R>, R> {
|
pub trait IsSubType<T: Callable<R>, R> {
|
||||||
fn is_aux_sub_type(&self) -> Option<&CallableCallFor<T, R>>;
|
fn is_sub_type(&self) -> Option<&CallableCallFor<T, R>>;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Implement a meta-dispatch module to dispatch to other dispatchers.
|
/// Implement a meta-dispatch module to dispatch to other dispatchers.
|
||||||
@@ -1305,7 +1305,7 @@ macro_rules! impl_outer_dispatch {
|
|||||||
$(
|
$(
|
||||||
impl $crate::dispatch::IsSubType<$camelcase, $runtime> for $call_type {
|
impl $crate::dispatch::IsSubType<$camelcase, $runtime> for $call_type {
|
||||||
#[allow(unreachable_patterns)]
|
#[allow(unreachable_patterns)]
|
||||||
fn is_aux_sub_type(&self) -> Option<&$crate::dispatch::CallableCallFor<$camelcase, $runtime>> {
|
fn is_sub_type(&self) -> Option<&$crate::dispatch::CallableCallFor<$camelcase, $runtime>> {
|
||||||
match *self {
|
match *self {
|
||||||
$call_type::$camelcase(ref r) => Some(r),
|
$call_type::$camelcase(ref r) => Some(r),
|
||||||
// May be unreachable
|
// May be unreachable
|
||||||
|
|||||||
Reference in New Issue
Block a user