Skip to content

Commit 60578d5

Browse files
committed
fix clippy again
1 parent b90cdca commit 60578d5

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

pallets/subtensor/src/swap/swap_hotkey.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ impl<T: Config> Pallet<T> {
325325
// StakingHotkeys( coldkey ) --> Vec<hotkey> -- the hotkeys that the coldkey stakes.
326326
let mut staking_hotkeys = StakingHotkeys::<T>::get(&coldkey);
327327
weight.saturating_accrue(T::DbWeight::get().reads(1));
328-
if staking_hotkeys.contains(&old_hotkey) {
328+
if staking_hotkeys.contains(old_hotkey) {
329329
staking_hotkeys.retain(|hk| *hk != *old_hotkey && *hk != *new_hotkey);
330330
staking_hotkeys.push(new_hotkey.clone());
331331
StakingHotkeys::<T>::insert(&coldkey, staking_hotkeys);

pallets/subtensor/src/tests/staking.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1730,12 +1730,12 @@ fn test_get_alpha_share_stake_multiple_delegators() {
17301730
// Debug prints
17311731
println!("Delegator1 stake: {}", stake1);
17321732
println!("Delegator2 stake: {}", stake2);
1733-
println!("Alpha share for for 1: {}", SubtensorModule::get_alpha_share_pool(hotkey1.clone(), netuid).get_value(&coldkey1));
1734-
println!("Alpha share for for 2: {}", SubtensorModule::get_alpha_share_pool(hotkey2.clone(), netuid).get_value(&coldkey2));
1733+
println!("Alpha share for for 1: {}", SubtensorModule::get_alpha_share_pool(hotkey1, netuid).get_value(&coldkey1));
1734+
println!("Alpha share for for 2: {}", SubtensorModule::get_alpha_share_pool(hotkey2, netuid).get_value(&coldkey2));
17351735

17361736
// Calculate expected total delegated stake
17371737
let expected_total_stake = stake1 + stake2 - existential_deposit * 2;
1738-
let actual_total_stake = SubtensorModule::get_alpha_share_pool(hotkey1.clone(), netuid).get_value(&coldkey1) + SubtensorModule::get_alpha_share_pool(hotkey2.clone(), netuid).get_value(&coldkey2);
1738+
let actual_total_stake = SubtensorModule::get_alpha_share_pool(hotkey1, netuid).get_value(&coldkey1) + SubtensorModule::get_alpha_share_pool(hotkey2, netuid).get_value(&coldkey2);
17391739

17401740
assert_eq!(
17411741
actual_total_stake,

0 commit comments

Comments
 (0)