@@ -1132,24 +1132,24 @@ fn test_swap_hotkey_with_pending_emissions() {
1132
1132
add_network ( netuid, 0 , 1 ) ;
1133
1133
1134
1134
// Set up pending emissions
1135
- PendingdHotkeyEmission :: < Test > :: insert ( & old_hotkey, pending_emission) ;
1135
+ PendingdHotkeyEmission :: < Test > :: insert ( old_hotkey, pending_emission) ;
1136
1136
// Verify the pending emissions are set
1137
1137
assert_eq ! (
1138
- PendingdHotkeyEmission :: <Test >:: get( & old_hotkey) ,
1138
+ PendingdHotkeyEmission :: <Test >:: get( old_hotkey) ,
1139
1139
pending_emission
1140
1140
) ;
1141
1141
// Verify the new hotkey does not have any pending emissions
1142
- assert ! ( !PendingdHotkeyEmission :: <Test >:: contains_key( & new_hotkey) ) ;
1142
+ assert ! ( !PendingdHotkeyEmission :: <Test >:: contains_key( new_hotkey) ) ;
1143
1143
1144
1144
// Perform the swap
1145
1145
SubtensorModule :: perform_hotkey_swap ( & old_hotkey, & new_hotkey, & coldkey, & mut weight) ;
1146
1146
1147
1147
// Verify the pending emissions are transferred
1148
1148
assert_eq ! (
1149
- PendingdHotkeyEmission :: <Test >:: get( & new_hotkey) ,
1149
+ PendingdHotkeyEmission :: <Test >:: get( new_hotkey) ,
1150
1150
pending_emission
1151
1151
) ;
1152
- assert ! ( !PendingdHotkeyEmission :: <Test >:: contains_key( & old_hotkey) ) ;
1152
+ assert ! ( !PendingdHotkeyEmission :: <Test >:: contains_key( old_hotkey) ) ;
1153
1153
} ) ;
1154
1154
}
1155
1155
@@ -1160,7 +1160,7 @@ fn test_swap_hotkeys_last_add_stake_increase() {
1160
1160
let old_hotkey = U256 :: from ( 1 ) ;
1161
1161
let new_hotkey = U256 :: from ( 2 ) ;
1162
1162
let coldkey = U256 :: from ( 3 ) ;
1163
- let new_coldkeys = vec ! [ U256 :: from( 4 ) , U256 :: from( 5 ) ] ;
1163
+ let new_coldkeys = [ U256 :: from ( 4 ) , U256 :: from ( 5 ) ] ;
1164
1164
let netuid = 0u16 ;
1165
1165
let mut weight = Weight :: zero ( ) ;
1166
1166
@@ -1171,10 +1171,10 @@ fn test_swap_hotkeys_last_add_stake_increase() {
1171
1171
1172
1172
// Setup LastAddStakeIncrease map
1173
1173
for new_coldkey in new_coldkeys. iter ( ) {
1174
- LastAddStakeIncrease :: < Test > :: insert ( & old_hotkey, & new_coldkey, 100 ) ;
1174
+ LastAddStakeIncrease :: < Test > :: insert ( old_hotkey, new_coldkey, 100 ) ;
1175
1175
}
1176
1176
// Verify the LastAddStakeIncrease map is empty for the new hotkey
1177
- assert ! ( LastAddStakeIncrease :: <Test >:: iter_prefix( & new_hotkey)
1177
+ assert ! ( LastAddStakeIncrease :: <Test >:: iter_prefix( new_hotkey)
1178
1178
. next( )
1179
1179
. is_none( ) ) ;
1180
1180
@@ -1184,12 +1184,12 @@ fn test_swap_hotkeys_last_add_stake_increase() {
1184
1184
// Verify the LastAddStakeIncrease map is transferred
1185
1185
for new_coldkey in new_coldkeys. iter ( ) {
1186
1186
assert_eq ! (
1187
- LastAddStakeIncrease :: <Test >:: get( & new_hotkey, & new_coldkey) ,
1187
+ LastAddStakeIncrease :: <Test >:: get( new_hotkey, new_coldkey) ,
1188
1188
100
1189
1189
) ;
1190
1190
assert ! ( !LastAddStakeIncrease :: <Test >:: contains_key(
1191
- & old_hotkey,
1192
- & new_coldkey
1191
+ old_hotkey,
1192
+ new_coldkey
1193
1193
) ) ;
1194
1194
}
1195
1195
} ) ;
0 commit comments