mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-21 15:35:42 +00:00
Rewrap all comments to 100 line width (#9490)
* reformat everything again * manual formatting * last manual fix * Fix build
This commit is contained in:
@@ -56,8 +56,8 @@ pub trait Currency<AccountId> {
|
||||
/// The total amount of issuance in the system.
|
||||
fn total_issuance() -> Self::Balance;
|
||||
|
||||
/// The minimum balance any single account may have. This is equivalent to the `Balances` module's
|
||||
/// `ExistentialDeposit`.
|
||||
/// The minimum balance any single account may have. This is equivalent to the `Balances`
|
||||
/// module's `ExistentialDeposit`.
|
||||
fn minimum_balance() -> Self::Balance;
|
||||
|
||||
/// Reduce the total issuance by `amount` and return the according imbalance. The imbalance will
|
||||
@@ -192,8 +192,8 @@ pub trait Currency<AccountId> {
|
||||
/// Ensure an account's free balance equals some value; this will create the account
|
||||
/// if needed.
|
||||
///
|
||||
/// Returns a signed imbalance and status to indicate if the account was successfully updated or update
|
||||
/// has led to killing of the account.
|
||||
/// Returns a signed imbalance and status to indicate if the account was successfully updated or
|
||||
/// update has led to killing of the account.
|
||||
fn make_free_balance_be(
|
||||
who: &AccountId,
|
||||
balance: Self::Balance,
|
||||
|
||||
@@ -193,8 +193,8 @@ pub trait NamedReservableCurrency<AccountId>: ReservableCurrency<AccountId> {
|
||||
Self::slash_reserved_named(id, who, value).0
|
||||
}
|
||||
|
||||
/// Move all the named reserved balance of one account into the balance of another, according to `status`.
|
||||
/// If `status` is `Reserved`, the balance will be reserved with given `id`.
|
||||
/// Move all the named reserved balance of one account into the balance of another, according to
|
||||
/// `status`. If `status` is `Reserved`, the balance will be reserved with given `id`.
|
||||
///
|
||||
/// Is a no-op if:
|
||||
/// - the value to be moved is zero; or
|
||||
|
||||
@@ -198,7 +198,8 @@ pub trait Unbalanced<AccountId>: Inspect<AccountId> {
|
||||
}
|
||||
let mut r = Self::set_balance(who, new_balance);
|
||||
if r.is_err() {
|
||||
// Some error, probably because we tried to destroy an account which cannot be destroyed.
|
||||
// Some error, probably because we tried to destroy an account which cannot be
|
||||
// destroyed.
|
||||
if new_balance.is_zero() && amount >= minimum_balance {
|
||||
new_balance = minimum_balance;
|
||||
amount -= minimum_balance;
|
||||
|
||||
@@ -142,7 +142,8 @@ pub type DebtOf<AccountId, B> = Imbalance<
|
||||
<B as Balanced<AccountId>>::OnDropCredit,
|
||||
>;
|
||||
|
||||
/// Imbalance implying that the total_issuance value is greater than the sum of all account balances.
|
||||
/// Imbalance implying that the total_issuance value is greater than the sum of all account
|
||||
/// balances.
|
||||
pub type CreditOf<AccountId, B> = Imbalance<
|
||||
<B as Inspect<AccountId>>::Balance,
|
||||
// This will generally be implemented by decreasing the total_issuance value.
|
||||
|
||||
@@ -223,7 +223,8 @@ pub trait Unbalanced<AccountId>: Inspect<AccountId> {
|
||||
}
|
||||
let mut r = Self::set_balance(asset, who, new_balance);
|
||||
if r.is_err() {
|
||||
// Some error, probably because we tried to destroy an account which cannot be destroyed.
|
||||
// Some error, probably because we tried to destroy an account which cannot be
|
||||
// destroyed.
|
||||
if new_balance.is_zero() && amount >= minimum_balance {
|
||||
new_balance = minimum_balance;
|
||||
amount -= minimum_balance;
|
||||
|
||||
@@ -168,7 +168,8 @@ pub type DebtOf<AccountId, B> = Imbalance<
|
||||
<B as Balanced<AccountId>>::OnDropCredit,
|
||||
>;
|
||||
|
||||
/// Imbalance implying that the total_issuance value is greater than the sum of all account balances.
|
||||
/// Imbalance implying that the total_issuance value is greater than the sum of all account
|
||||
/// balances.
|
||||
pub type CreditOf<AccountId, B> = Imbalance<
|
||||
<B as Inspect<AccountId>>::AssetId,
|
||||
<B as Inspect<AccountId>>::Balance,
|
||||
|
||||
@@ -51,8 +51,8 @@ pub enum WithdrawConsequence<Balance> {
|
||||
}
|
||||
|
||||
impl<Balance: Zero> WithdrawConsequence<Balance> {
|
||||
/// Convert the type into a `Result` with `DispatchError` as the error or the additional `Balance`
|
||||
/// by which the account will be reduced.
|
||||
/// Convert the type into a `Result` with `DispatchError` as the error or the additional
|
||||
/// `Balance` by which the account will be reduced.
|
||||
pub fn into_result(self) -> Result<Balance, DispatchError> {
|
||||
use WithdrawConsequence::*;
|
||||
match self {
|
||||
|
||||
Reference in New Issue
Block a user