@@ -1363,7 +1363,7 @@ impl_runtime_apis! {
1363
1363
}
1364
1364
1365
1365
fn get_delegate( delegate_account_vec: Vec <u8 >) -> Vec <u8 > {
1366
- SubtensorModule :: get_delegate( delegate_account_vec) . map( |r| r. encode( ) ) . unwrap_or ( vec! [ ] )
1366
+ SubtensorModule :: get_delegate( delegate_account_vec) . map( |r| r. encode( ) ) . unwrap_or_default ( )
1367
1367
}
1368
1368
1369
1369
fn get_delegated( delegatee_account_vec: Vec <u8 >) -> Vec <u8 > {
@@ -1379,7 +1379,7 @@ impl_runtime_apis! {
1379
1379
}
1380
1380
1381
1381
fn get_neuron_lite( netuid: u16 , uid: u16 ) -> Vec <u8 > {
1382
- SubtensorModule :: get_neuron_lite( netuid, uid) . map( |r| r. encode( ) ) . unwrap_or ( vec! [ ] )
1382
+ SubtensorModule :: get_neuron_lite( netuid, uid) . map( |r| r. encode( ) ) . unwrap_or_default ( )
1383
1383
}
1384
1384
1385
1385
fn get_neurons( netuid: u16 ) -> Vec <u8 > {
@@ -1388,13 +1388,13 @@ impl_runtime_apis! {
1388
1388
}
1389
1389
1390
1390
fn get_neuron( netuid: u16 , uid: u16 ) -> Vec <u8 > {
1391
- SubtensorModule :: get_neuron( netuid, uid) . map( |r| r. encode( ) ) . unwrap_or ( vec! [ ] )
1391
+ SubtensorModule :: get_neuron( netuid, uid) . map( |r| r. encode( ) ) . unwrap_or_default ( )
1392
1392
}
1393
1393
}
1394
1394
1395
1395
impl subtensor_custom_rpc_runtime_api:: SubnetInfoRuntimeApi <Block > for Runtime {
1396
1396
fn get_subnet_info( netuid: u16 ) -> Vec <u8 > {
1397
- SubtensorModule :: get_subnet_info( netuid) . map( |r| r. encode( ) ) . unwrap_or ( vec! [ ] )
1397
+ SubtensorModule :: get_subnet_info( netuid) . map( |r| r. encode( ) ) . unwrap_or_default ( )
1398
1398
}
1399
1399
1400
1400
fn get_subnets_info( ) -> Vec <u8 > {
@@ -1418,7 +1418,7 @@ impl_runtime_apis! {
1418
1418
}
1419
1419
1420
1420
fn get_subnet_hyperparams( netuid: u16 ) -> Vec <u8 > {
1421
- SubtensorModule :: get_subnet_hyperparams( netuid) . map( |r| r. encode( ) ) . unwrap_or ( vec! [ ] )
1421
+ SubtensorModule :: get_subnet_hyperparams( netuid) . map( |r| r. encode( ) ) . unwrap_or_default ( )
1422
1422
}
1423
1423
}
1424
1424
0 commit comments