From 05d0d8de412def161fb22ed051e8607582544182 Mon Sep 17 00:00:00 2001 From: Andreea Popescu Date: Sat, 31 Aug 2024 15:48:43 +0800 Subject: [PATCH] rebase clippy --- runtime/src/lib.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/runtime/src/lib.rs b/runtime/src/lib.rs index d41a82186..0d952c2bb 100644 --- a/runtime/src/lib.rs +++ b/runtime/src/lib.rs @@ -1363,7 +1363,7 @@ impl_runtime_apis! { } fn get_delegate(delegate_account_vec: Vec) -> Vec { - SubtensorModule::get_delegate(delegate_account_vec).map(|r| r.encode()).unwrap_or(vec![]) + SubtensorModule::get_delegate(delegate_account_vec).map(|r| r.encode()).unwrap_or_default() } fn get_delegated(delegatee_account_vec: Vec) -> Vec { @@ -1379,7 +1379,7 @@ impl_runtime_apis! { } fn get_neuron_lite(netuid: u16, uid: u16) -> Vec { - SubtensorModule::get_neuron_lite(netuid, uid).map(|r| r.encode()).unwrap_or(vec![]) + SubtensorModule::get_neuron_lite(netuid, uid).map(|r| r.encode()).unwrap_or_default() } fn get_neurons(netuid: u16) -> Vec { @@ -1388,13 +1388,13 @@ impl_runtime_apis! { } fn get_neuron(netuid: u16, uid: u16) -> Vec { - SubtensorModule::get_neuron(netuid, uid).map(|r| r.encode()).unwrap_or(vec![]) + SubtensorModule::get_neuron(netuid, uid).map(|r| r.encode()).unwrap_or_default() } } impl subtensor_custom_rpc_runtime_api::SubnetInfoRuntimeApi for Runtime { fn get_subnet_info(netuid: u16) -> Vec { - SubtensorModule::get_subnet_info(netuid).map(|r| r.encode()).unwrap_or(vec![]) + SubtensorModule::get_subnet_info(netuid).map(|r| r.encode()).unwrap_or_default() } fn get_subnets_info() -> Vec { @@ -1418,7 +1418,7 @@ impl_runtime_apis! { } fn get_subnet_hyperparams(netuid: u16) -> Vec { - SubtensorModule::get_subnet_hyperparams(netuid).map(|r| r.encode()).unwrap_or(vec![]) + SubtensorModule::get_subnet_hyperparams(netuid).map(|r| r.encode()).unwrap_or_default() } }