diff --git a/Cargo.lock b/Cargo.lock index 25d7b643de3..07823520c65 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5696,6 +5696,7 @@ dependencies = [ "rand", "serde", "strum", + "strum_macros", "tari_common", "tari_crypto", "tari_utilities", diff --git a/applications/minotari_console_wallet/src/init/mod.rs b/applications/minotari_console_wallet/src/init/mod.rs index c1c6671518f..6f4a6599cd2 100644 --- a/applications/minotari_console_wallet/src/init/mod.rs +++ b/applications/minotari_console_wallet/src/init/mod.rs @@ -811,11 +811,11 @@ pub(crate) fn boot_with_password( } pub fn prompt_wallet_type( - boot_mode: &WalletBoot, + boot_mode: WalletBoot, wallet_config: &WalletConfig, - non_interactive: &bool, + non_interactive: bool, ) -> Option { - if *non_interactive { + if non_interactive { return Some(WalletType::Software); } diff --git a/applications/minotari_console_wallet/src/lib.rs b/applications/minotari_console_wallet/src/lib.rs index 229957985de..95cb8c32dae 100644 --- a/applications/minotari_console_wallet/src/lib.rs +++ b/applications/minotari_console_wallet/src/lib.rs @@ -126,10 +126,10 @@ pub fn run_wallet_with_cli( // check for recovery based on existence of wallet file let (mut boot_mode, password) = boot_with_password(&cli, &config.wallet)?; - let recovery_seed = get_recovery_seed(&boot_mode, &cli)?; + let recovery_seed = get_recovery_seed(boot_mode, &cli)?; // This is deactivated at the moment as full support is not yet complete - let wallet_type = prompt_wallet_type(&boot_mode, &config.wallet, &cli.non_interactive_mode); + let wallet_type = prompt_wallet_type(boot_mode, &config.wallet, cli.non_interactive_mode); // get command line password if provided let seed_words_file_name = cli.seed_words_file_name.clone(); @@ -256,7 +256,7 @@ fn get_password(config: &ApplicationConfig, cli: &Cli) -> Option { .map(|s| s.to_owned()) } -fn get_recovery_seed(boot_mode: &WalletBoot, cli: &Cli) -> Result, ExitError> { +fn get_recovery_seed(boot_mode: WalletBoot, cli: &Cli) -> Result, ExitError> { if matches!(boot_mode, WalletBoot::Recovery) { let seed = if let Some(ref seed_words) = cli.seed_words { get_seed_from_seed_words(seed_words)? diff --git a/base_layer/common_types/Cargo.toml b/base_layer/common_types/Cargo.toml index 2d71f02b960..61497332662 100644 --- a/base_layer/common_types/Cargo.toml +++ b/base_layer/common_types/Cargo.toml @@ -20,7 +20,11 @@ once_cell = "1.8.0" rand = "0.8" serde = { version = "1.0.106", features = ["derive"] } strum = "0.22" +strum_macros = "0.22" thiserror = "1.0.29" base64 = "0.21.0" blake2 = "0.10" primitive-types = { version = "0.12", features = ["serde"] } + +[package.metadata.cargo-machete] +ignored = ["strum", "strum_macros"] # this is so we can run cargo machete without getting false positive about macro dependancies diff --git a/base_layer/common_types/src/wallet_types.rs b/base_layer/common_types/src/wallet_types.rs index 9a25fa5a460..052df957ea1 100644 --- a/base_layer/common_types/src/wallet_types.rs +++ b/base_layer/common_types/src/wallet_types.rs @@ -26,7 +26,7 @@ use std::{ }; use serde::{Deserialize, Serialize}; -use strum::EnumString; +use strum_macros::EnumString; #[derive(Debug, EnumString, Clone, Copy, Serialize, Deserialize)] pub enum WalletType { diff --git a/infrastructure/derive/Cargo.toml b/infrastructure/derive/Cargo.toml index d24688c14e7..62040fd737a 100644 --- a/infrastructure/derive/Cargo.toml +++ b/infrastructure/derive/Cargo.toml @@ -6,7 +6,7 @@ repository = "https://github.com/tari-project/tari" homepage = "https://tari.com" readme = "README.md" license = "BSD-3-Clause" -version = "1.0.0-pre.11a +version = "1.0.0-pre.11a" edition = "2018" [lib] @@ -15,4 +15,4 @@ proc-macro = true [dependencies] quote = "0.6.11" syn = "0.15.29" -proc-macro2 = "0.4.27" +proc-macro2 = "0.4.27"