mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-17 11:21:07 +00:00
Restructure dispatch macro related exports (#1162)
* restructure dispatch macro related exports * moved Dispatchable to lib.rs * fix .gitignore final newline * ".git/.scripts/commands/fmt/fmt.sh" * fix rustdocs * wip --------- Co-authored-by: Liam Aharon <liam.aharon@hotmail.com> Co-authored-by: command-bot <> Co-authored-by: ordian <write@reusable.software>
This commit is contained in:
@@ -21,11 +21,8 @@ use super::{
|
||||
imbalance::{Imbalance, SignedImbalance},
|
||||
misc::{Balance, ExistenceRequirement, WithdrawReasons},
|
||||
};
|
||||
use crate::{
|
||||
dispatch::{DispatchError, DispatchResult},
|
||||
traits::Get,
|
||||
};
|
||||
use sp_runtime::traits::MaybeSerializeDeserialize;
|
||||
use crate::{dispatch::DispatchResult, traits::Get};
|
||||
use sp_runtime::{traits::MaybeSerializeDeserialize, DispatchError};
|
||||
|
||||
mod reservable;
|
||||
pub use reservable::{NamedReservableCurrency, ReservableCurrency};
|
||||
|
||||
@@ -22,9 +22,10 @@ use sp_core::Get;
|
||||
|
||||
use super::{super::misc::BalanceStatus, Currency};
|
||||
use crate::{
|
||||
dispatch::{DispatchError, DispatchResult},
|
||||
dispatch::DispatchResult,
|
||||
traits::{ExistenceRequirement, SignedImbalance, WithdrawReasons},
|
||||
};
|
||||
use sp_runtime::DispatchError;
|
||||
|
||||
/// A currency where funds can be reserved from the user.
|
||||
pub trait ReservableCurrency<AccountId>: Currency<AccountId> {
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
//! `Inspect` and `Mutate` traits for working with regular balances.
|
||||
|
||||
use crate::{
|
||||
dispatch::DispatchError,
|
||||
ensure,
|
||||
traits::{
|
||||
tokens::{
|
||||
@@ -36,7 +35,7 @@ use crate::{
|
||||
},
|
||||
};
|
||||
use sp_arithmetic::traits::{CheckedAdd, CheckedSub, One};
|
||||
use sp_runtime::{traits::Saturating, ArithmeticError, TokenError};
|
||||
use sp_runtime::{traits::Saturating, ArithmeticError, DispatchError, TokenError};
|
||||
use sp_std::marker::PhantomData;
|
||||
|
||||
use super::{Credit, Debt, HandleImbalanceDrop, Imbalance};
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
use sp_std::marker::PhantomData;
|
||||
|
||||
use crate::{
|
||||
dispatch::DispatchError,
|
||||
ensure,
|
||||
traits::{
|
||||
tokens::{
|
||||
@@ -38,7 +37,7 @@ use crate::{
|
||||
},
|
||||
};
|
||||
use sp_arithmetic::traits::{CheckedAdd, CheckedSub, One};
|
||||
use sp_runtime::{traits::Saturating, ArithmeticError, TokenError};
|
||||
use sp_runtime::{traits::Saturating, ArithmeticError, DispatchError, TokenError};
|
||||
|
||||
use super::{Credit, Debt, HandleImbalanceDrop, Imbalance};
|
||||
|
||||
|
||||
@@ -27,9 +27,9 @@
|
||||
//! Implementations of these traits may be converted to implementations of corresponding
|
||||
//! `nonfungible` traits by using the `nonfungible::ItemOf` type adapter.
|
||||
|
||||
use crate::dispatch::{DispatchError, DispatchResult};
|
||||
use crate::dispatch::DispatchResult;
|
||||
use codec::{Decode, Encode};
|
||||
use sp_runtime::TokenError;
|
||||
use sp_runtime::{DispatchError, TokenError};
|
||||
use sp_std::prelude::*;
|
||||
|
||||
/// Trait for providing an interface to many read-only NFT-like sets of items.
|
||||
|
||||
@@ -27,9 +27,9 @@
|
||||
//! Implementations of these traits may be converted to implementations of corresponding
|
||||
//! `nonfungible` traits by using the `nonfungible::ItemOf` type adapter.
|
||||
|
||||
use crate::dispatch::{DispatchError, DispatchResult, Parameter};
|
||||
use crate::dispatch::{DispatchResult, Parameter};
|
||||
use codec::{Decode, Encode};
|
||||
use sp_runtime::TokenError;
|
||||
use sp_runtime::{DispatchError, TokenError};
|
||||
use sp_std::prelude::*;
|
||||
|
||||
/// Trait for providing an interface to many read-only NFT-like sets of items.
|
||||
|
||||
@@ -18,10 +18,10 @@
|
||||
//! Traits and associated data structures concerned with voting, and moving between tokens and
|
||||
//! votes.
|
||||
|
||||
use crate::dispatch::{DispatchError, Parameter};
|
||||
use crate::dispatch::Parameter;
|
||||
use codec::{HasCompact, MaxEncodedLen};
|
||||
use sp_arithmetic::Perbill;
|
||||
use sp_runtime::traits::Member;
|
||||
use sp_runtime::{traits::Member, DispatchError};
|
||||
use sp_std::prelude::*;
|
||||
|
||||
pub trait VoteTally<Votes, Class> {
|
||||
|
||||
Reference in New Issue
Block a user