Skip to content

Commit

Permalink
fix clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
Ank4n committed Aug 13, 2024
1 parent ae9a370 commit 251ba4c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions substrate/frame/delegated-staking/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,12 @@ impl<T: Config> Delegation<T> {
if self.amount == Zero::zero() {
<Delegators<T>>::remove(key);
// Remove provider if no delegation left.
let _ = frame_system::Pallet::<T>::dec_providers(&key).defensive();
let _ = frame_system::Pallet::<T>::dec_providers(key).defensive();
return
}
} else {
// this is a new delegation. Provide for this account.
frame_system::Pallet::<T>::inc_providers(&key);
frame_system::Pallet::<T>::inc_providers(key);
}

<Delegators<T>>::insert(key, self);
Expand Down Expand Up @@ -133,7 +133,7 @@ impl<T: Config> AgentLedger<T> {
pub(crate) fn update(self, key: &T::AccountId) {
if !<Agents<T>>::contains_key(key) {
// This is a new agent. Provide for this account.
frame_system::Pallet::<T>::inc_providers(&key);
frame_system::Pallet::<T>::inc_providers(key);
}
<Agents<T>>::insert(key, self)
}
Expand Down

0 comments on commit 251ba4c

Please sign in to comment.