Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Update stale docstring with 'EnsureOneOf' introduced. #6501

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions frame/identity/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,7 @@ decl_module! {

/// Add a registrar to the system.
///
/// The dispatch origin for this call must be `RegistrarOrigin` or `Root`.
/// The dispatch origin for this call must be `RegistrarOrigin`.
///
/// - `account`: the account of the registrar.
///
Expand Down Expand Up @@ -1087,7 +1087,7 @@ decl_module! {
/// `Slash`. Verification request deposits are not returned; they should be cancelled
/// manually using `cancel_request`.
///
/// The dispatch origin for this call must be _Root_ or match `T::ForceOrigin`.
/// The dispatch origin for this call must match `T::ForceOrigin`.
///
/// - `target`: the account whose identity the judgement is upon. This must be an account
/// with a registered identity.
Expand Down
12 changes: 8 additions & 4 deletions frame/membership/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ decl_module! {

/// Add a member `who` to the set.
///
/// May only be called from `AddOrigin` or root.
/// May only be called from `AddOrigin`.
shaunxw marked this conversation as resolved.
Show resolved Hide resolved
#[weight = 50_000_000]
pub fn add_member(origin, who: T::AccountId) {
T::AddOrigin::ensure_origin(origin)?;
Expand All @@ -134,7 +134,7 @@ decl_module! {

/// Remove a member `who` from the set.
///
/// May only be called from `RemoveOrigin` or root.
/// May only be called from `RemoveOrigin`.
shaunxw marked this conversation as resolved.
Show resolved Hide resolved
#[weight = 50_000_000]
pub fn remove_member(origin, who: T::AccountId) {
T::RemoveOrigin::ensure_origin(origin)?;
Expand All @@ -152,7 +152,7 @@ decl_module! {

/// Swap out one member `remove` for another `add`.
///
/// May only be called from `SwapOrigin` or root.
/// May only be called from `SwapOrigin`.
shaunxw marked this conversation as resolved.
Show resolved Hide resolved
///
/// Prime membership is *not* passed from `remove` to `add`, if extant.
#[weight = 50_000_000]
Expand Down Expand Up @@ -181,7 +181,7 @@ decl_module! {
/// Change the membership to a new set, disregarding the existing membership. Be nice and
/// pass `members` pre-sorted.
///
/// May only be called from `ResetOrigin` or root.
/// May only be called from `ResetOrigin`.
shaunxw marked this conversation as resolved.
Show resolved Hide resolved
#[weight = 50_000_000]
pub fn reset_members(origin, members: Vec<T::AccountId>) {
T::ResetOrigin::ensure_origin(origin)?;
Expand Down Expand Up @@ -231,6 +231,8 @@ decl_module! {
}

/// Set the prime member. Must be a current member.
///
/// May only be called from `PrimeOrigin`.
shaunxw marked this conversation as resolved.
Show resolved Hide resolved
#[weight = 50_000_000]
pub fn set_prime(origin, who: T::AccountId) {
T::PrimeOrigin::ensure_origin(origin)?;
Expand All @@ -240,6 +242,8 @@ decl_module! {
}

/// Remove the prime member if it exists.
///
/// May only be called from `PrimeOrigin`.
shaunxw marked this conversation as resolved.
Show resolved Hide resolved
#[weight = 50_000_000]
pub fn clear_prime(origin) {
T::PrimeOrigin::ensure_origin(origin)?;
Expand Down
4 changes: 2 additions & 2 deletions frame/nicks/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ decl_module! {
/// Fails if `who` has not been named. The deposit is dealt with through `T::Slashed`
/// imbalance handler.
///
/// The dispatch origin for this call must be _Root_ or match `T::ForceOrigin`.
/// The dispatch origin for this call must match `T::ForceOrigin`.
///
/// # <weight>
/// - O(1).
Expand All @@ -213,7 +213,7 @@ decl_module! {
///
/// No length checking is done on the name.
///
/// The dispatch origin for this call must be _Root_ or match `T::ForceOrigin`.
/// The dispatch origin for this call must match `T::ForceOrigin`.
///
/// # <weight>
/// - O(1).
Expand Down
4 changes: 2 additions & 2 deletions frame/scored-pool/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ decl_module! {

/// Kick a member `who` from the set.
///
/// May only be called from `KickOrigin` or root.
/// May only be called from `KickOrigin`.
shaunxw marked this conversation as resolved.
Show resolved Hide resolved
///
/// The `index` parameter of this function must be set to
/// the index of `dest` in the `Pool`.
Expand All @@ -331,7 +331,7 @@ decl_module! {

/// Score a member `who` with `score`.
///
/// May only be called from `ScoreOrigin` or root.
/// May only be called from `ScoreOrigin`.
shaunxw marked this conversation as resolved.
Show resolved Hide resolved
///
/// The `index` parameter of this function must be set to
/// the index of the `dest` in the `Pool`.
Expand Down
2 changes: 1 addition & 1 deletion frame/staking/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1928,7 +1928,7 @@ decl_module! {

/// Cancel enactment of a deferred slash.
///
/// Can be called by either the root origin or the `T::SlashCancelOrigin`.
/// Can be called by the `T::SlashCancelOrigin`.
///
/// Parameters: era and indices of the slashes for that era to kill.
///
Expand Down
6 changes: 5 additions & 1 deletion frame/treasury/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ decl_module! {

/// The amount held on deposit per byte within the tip report reason.
const TipReportDepositPerByte: BalanceOf<T> = T::TipReportDepositPerByte::get();

/// The treasury's module id, used for deriving its sovereign account ID.
const ModuleId: ModuleId = T::ModuleId::get();

Expand Down Expand Up @@ -355,6 +355,8 @@ decl_module! {

/// Reject a proposed spend. The original deposit will be slashed.
///
/// May only be called from `RejectOrigin`.
shaunxw marked this conversation as resolved.
Show resolved Hide resolved
///
/// # <weight>
/// - Complexity: O(1)
/// - DbReads: `Proposals`, `rejected proposer account`
Expand All @@ -375,6 +377,8 @@ decl_module! {
/// Approve a proposal. At a later time, the proposal will be allocated to the beneficiary
/// and the original deposit will be returned.
///
/// May only be called from `ApproveOrigin`.
shaunxw marked this conversation as resolved.
Show resolved Hide resolved
///
/// # <weight>
/// - Complexity: O(1).
/// - DbReads: `Proposals`, `Approvals`
Expand Down