Skip to content

Commit

Permalink
Comment tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
olegnn committed Jan 23, 2024
1 parent 74ecc63 commit d596f83
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pallets/core/src/util/batch_update.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@ use sp_runtime::{DispatchError, Either};

/// Checks whether an actor can update an entity.
pub trait CanUpdate<Entity>: Sized {
/// Checks whether underlying keyed update can be applied, i.e. all associated updates are valid.
/// Checks whether the new entity can be added.
#[must_use]
fn can_add(&self, _new: &Entity) -> bool {
false
}

/// Checks whether underlying keyed update can be applied, i.e. all associated updates are valid.
/// Checks whether the provided entity can replace the existing one.
#[must_use]
fn can_replace(&self, _new: &Entity, _current: &Entity) -> bool {
false
}

/// Checks whether underlying keyed update can be applied, i.e. all associated updates are valid.
/// Checks whether the existing entity can be removed.
#[must_use]
fn can_remove(&self, _entity: &Entity) -> bool {
false
Expand All @@ -32,7 +32,7 @@ where
Entity: Deref,
Entity::Target: BoundedKeyValue,
{
/// Checks whether underlying keyed update can be applied, i.e. all associated updates are valid.
/// Checks whether the underlying keyed update can be applied, i.e. all associated updates are valid.
#[must_use]
fn can_update_keyed<U: KeyedUpdate<Entity>>(&self, _entity: &Entity, _update: &U) -> bool {
false
Expand Down

0 comments on commit d596f83

Please sign in to comment.