apply octlol unwrap or default suggestion
This commit is contained in:
@@ -78,11 +78,7 @@ pub(crate) async fn get_mixnode_description(
|
||||
source: err,
|
||||
})?;
|
||||
|
||||
let noise_info = if let Ok(noise_info) = client.get_noise_information().await {
|
||||
noise_info
|
||||
} else {
|
||||
Default::default()
|
||||
};
|
||||
let noise_info = client.get_noise_information().await.unwrap_or_default();
|
||||
|
||||
let description = NymNodeDescription {
|
||||
host_information: host_info.data,
|
||||
|
||||
@@ -183,11 +183,7 @@ async fn get_gateway_description(
|
||||
None
|
||||
};
|
||||
|
||||
let noise_info = if let Ok(noise_info) = client.get_noise_information().await {
|
||||
noise_info
|
||||
} else {
|
||||
Default::default()
|
||||
};
|
||||
let noise_info = client.get_noise_information().await.unwrap_or_default();
|
||||
|
||||
let description = NymNodeDescription {
|
||||
host_information: host_info.data,
|
||||
|
||||
Reference in New Issue
Block a user