From caec19fce385a7502bbf6891cd4aabe9cf8ecc49 Mon Sep 17 00:00:00 2001 From: Amr Bashir Date: Thu, 9 May 2024 23:35:02 +0300 Subject: [PATCH] chore(deps): remove unused deps from cli (#9711) * chore(deps): remove unused deps from cli * fix mac build * clippy --- tooling/cli/Cargo.lock | 3 --- tooling/cli/Cargo.toml | 3 --- tooling/cli/src/mobile/android/dev.rs | 12 +++--------- tooling/cli/src/mobile/ios/dev.rs | 9 ++------- 4 files changed, 5 insertions(+), 22 deletions(-) diff --git a/tooling/cli/Cargo.lock b/tooling/cli/Cargo.lock index aa0909502f40..e767a166b198 100644 --- a/tooling/cli/Cargo.lock +++ b/tooling/cli/Cargo.lock @@ -4947,15 +4947,12 @@ dependencies = [ "tauri-icns", "tauri-utils 1.5.4", "tauri-utils 2.0.0-beta.15", - "thiserror", "tokio", "toml 0.8.10", "toml_edit 0.22.6", - "unicode-width", "ureq", "url", "windows-sys 0.52.0", - "zeroize", ] [[package]] diff --git a/tooling/cli/Cargo.toml b/tooling/cli/Cargo.toml index 4aaef336c5a1..8360f556e7da 100644 --- a/tooling/cli/Cargo.toml +++ b/tooling/cli/Cargo.toml @@ -44,7 +44,6 @@ jsonrpsee = { version = "0.22", features = [ "server" ] } jsonrpsee-core = "0.22" jsonrpsee-client-transport = { version = "0.22", features = [ "ws" ] } jsonrpsee-ws-client = { version = "0.22", default-features = false } -thiserror = "1" sublime_fuzzy = "0.7" clap_complete = "4" clap = { version = "4.5", features = [ "derive", "env" ] } @@ -71,8 +70,6 @@ ureq = { version = "2.9.6", default-features = false, features = [ "gzip" ] } os_info = "3" semver = "1.0" regex = "1.10.3" -unicode-width = "0.1" -zeroize = "1.7" heck = "0.5" dialoguer = "0.11" url = { version = "2.5", features = [ "serde" ] } diff --git a/tooling/cli/src/mobile/android/dev.rs b/tooling/cli/src/mobile/android/dev.rs index 9b8fa09f5a24..25aae5765a4a 100644 --- a/tooling/cli/src/mobile/android/dev.rs +++ b/tooling/cli/src/mobile/android/dev.rs @@ -269,7 +269,7 @@ fn run_dev( } Err(e) => { crate::dev::kill_before_dev_process(); - Err(e.into()) + Err(e) } } } else { @@ -279,12 +279,6 @@ fn run_dev( ) } -#[derive(Debug, thiserror::Error)] -enum RunError { - #[error("{0}")] - RunFailed(String), -} - fn run( device: &Device<'_>, options: MobileOptions, @@ -292,7 +286,7 @@ fn run( env: &Env, metadata: &AndroidMetadata, noise_level: NoiseLevel, -) -> Result { +) -> crate::Result { let profile = if options.debug { Profile::Debug } else { @@ -317,5 +311,5 @@ fn run( ".MainActivity".into(), ) .map(DevChild::new) - .map_err(|e| RunError::RunFailed(e.to_string())) + .map_err(Into::into) } diff --git a/tooling/cli/src/mobile/ios/dev.rs b/tooling/cli/src/mobile/ios/dev.rs index 90fb88d540bf..95ecfb48c17d 100644 --- a/tooling/cli/src/mobile/ios/dev.rs +++ b/tooling/cli/src/mobile/ios/dev.rs @@ -244,17 +244,12 @@ fn run_dev( ) } -#[derive(Debug, thiserror::Error)] -enum RunError { - #[error("{0}")] - RunFailed(String), -} fn run( device: &Device<'_>, options: MobileOptions, config: &AppleConfig, env: &Env, -) -> Result { +) -> crate::Result { let profile = if options.debug { Profile::Debug } else { @@ -270,5 +265,5 @@ fn run( profile, ) .map(DevChild::new) - .map_err(|e| RunError::RunFailed(e.to_string())) + .map_err(Into::into) }