@@ -2183,30 +2183,29 @@ fn test_migrate_kappa_map_to_default() {
21832183 let default: u16 = DefaultKappa :: < Test > :: get ( ) ;
21842184 let not_default: u16 = default. wrapping_add ( 1 ) ;
21852185
2186- // Choose a few netuids to exercise both "changed" and "unchanged" paths
2187- let n0: u16 = 0 ;
2188- let n1: u16 = 1 ;
2189- let n2: u16 = 42 ;
2190-
21912186 // ------------------------------
21922187 // 1. Pre-state: seed non-default & default entries
21932188 // ------------------------------
2194- Kappa :: < Test > :: insert ( n0, not_default) ; // will need update
2195- Kappa :: < Test > :: insert ( n1, default) ; // already default
2196- Kappa :: < Test > :: insert ( n2, not_default) ; // will need update
2189+ let n0: NetUid = 0u16 . into ( ) ;
2190+ let n1: NetUid = 1u16 . into ( ) ;
2191+ let n2: NetUid = 42u16 . into ( ) ;
2192+
2193+ Kappa :: < Test > :: insert ( & n0, not_default) ;
2194+ Kappa :: < Test > :: insert ( & n1, default) ;
2195+ Kappa :: < Test > :: insert ( & n2, not_default) ;
21972196
21982197 assert_eq ! (
2199- Kappa :: <Test >:: get( n0) ,
2198+ Kappa :: <Test >:: get( & n0) ,
22002199 not_default,
22012200 "precondition failed: Kappa[n0] should be non-default before migration"
22022201 ) ;
22032202 assert_eq ! (
2204- Kappa :: <Test >:: get( n1) ,
2203+ Kappa :: <Test >:: get( & n1) ,
22052204 default ,
22062205 "precondition failed: Kappa[n1] should be default before migration"
22072206 ) ;
22082207 assert_eq ! (
2209- Kappa :: <Test >:: get( n2) ,
2208+ Kappa :: <Test >:: get( & n2) ,
22102209 not_default,
22112210 "precondition failed: Kappa[n2] should be non-default before migration"
22122211 ) ;
@@ -2232,17 +2231,17 @@ fn test_migrate_kappa_map_to_default() {
22322231 ) ;
22332232
22342233 assert_eq ! (
2235- Kappa :: <Test >:: get( n0) ,
2234+ Kappa :: <Test >:: get( & n0) ,
22362235 default ,
22372236 "Kappa[n0] should be reset to the configured default"
22382237 ) ;
22392238 assert_eq ! (
2240- Kappa :: <Test >:: get( n1) ,
2239+ Kappa :: <Test >:: get( & n1) ,
22412240 default ,
22422241 "Kappa[n1] should remain at the configured default"
22432242 ) ;
22442243 assert_eq ! (
2245- Kappa :: <Test >:: get( n2) ,
2244+ Kappa :: <Test >:: get( & n2) ,
22462245 default ,
22472246 "Kappa[n2] should be reset to the configured default"
22482247 ) ;
0 commit comments