From 03c702d498a7f9f9bb95658dcd64e6be30e271da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=20H=C3=A4ggblad?= Date: Thu, 4 Apr 2024 22:05:57 +0200 Subject: [PATCH] Remove unused KeyMode type --- sdk/rust/nym-sdk/src/mixnet.rs | 2 +- sdk/rust/nym-sdk/src/mixnet/config.rs | 18 ------------------ 2 files changed, 1 insertion(+), 19 deletions(-) diff --git a/sdk/rust/nym-sdk/src/mixnet.rs b/sdk/rust/nym-sdk/src/mixnet.rs index c89229fb28..8e0c83aca3 100644 --- a/sdk/rust/nym-sdk/src/mixnet.rs +++ b/sdk/rust/nym-sdk/src/mixnet.rs @@ -39,7 +39,7 @@ mod socks5_client; mod traits; pub use client::{DisconnectedMixnetClient, IncludedSurbs, MixnetClientBuilder}; -pub use config::{Config, KeyMode}; +pub use config::Config; pub use native_client::MixnetClient; pub use native_client::MixnetClientSender; pub use nym_client_core::{ diff --git a/sdk/rust/nym-sdk/src/mixnet/config.rs b/sdk/rust/nym-sdk/src/mixnet/config.rs index 264f857413..5e3363e03f 100644 --- a/sdk/rust/nym-sdk/src/mixnet/config.rs +++ b/sdk/rust/nym-sdk/src/mixnet/config.rs @@ -5,30 +5,12 @@ use url::Url; const DEFAULT_SDK_CLIENT_ID: &str = "_default-nym-sdk-client"; -#[derive(Clone, Debug, Default)] -pub enum KeyMode { - /// Use existing key files if they exists, otherwise create new ones. - #[default] - Keep, - /// Create new keys, overwriting any potential previously existing keys. - Overwrite, -} - -impl KeyMode { - pub(crate) fn is_keep(&self) -> bool { - matches!(self, KeyMode::Keep) - } -} - /// Config struct for [`crate::mixnet::MixnetClient`] #[derive(Default)] pub struct Config { /// If the user has explicitly specified a gateway. pub user_chosen_gateway: Option, - /// Determines how to handle existing key files found. - pub key_mode: KeyMode, - /// The details of the network we're using. It defaults to the mainnet network. pub network_details: NymNetworkDetails,