Fix wallet clippy lints

This commit is contained in:
durch
2022-01-20 11:31:35 +01:00
parent 8b166f12f8
commit 6ff02bc2a1
2 changed files with 4 additions and 3 deletions
+2
View File
@@ -8,6 +8,7 @@ use strum::EnumIter;
use crate::error::BackendError;
use config::defaults::all::Network as ConfigNetwork;
#[allow(clippy::upper_case_acronyms)]
#[cfg_attr(test, derive(ts_rs::TS))]
#[derive(Copy, Clone, Debug, Deserialize, EnumIter, Eq, Hash, PartialEq, Serialize)]
pub enum Network {
@@ -21,6 +22,7 @@ impl Default for Network {
}
}
#[allow(clippy::from_over_into)]
impl Into<ConfigNetwork> for Network {
fn into(self) -> ConfigNetwork {
match self {
@@ -142,7 +142,6 @@ async fn _connect_with_mnemonic(
w_state.add_client(network, client);
}
default_account.ok_or(BackendError::NetworkNotSupported(
config::defaults::default_network(),
))
default_account
.ok_or_else(|| BackendError::NetworkNotSupported(config::defaults::default_network()))
}