Misc. dependency cleanup (#6810)

* remove ensure_dir_exists (2 deps saved)

* group UNHANDLED_ERRORs into a generic (2 deps saved)

* Introduce separate `health_metrics` crate

* separate health_metrics crate

* remove metrics from warp_utils

* move ProcessHealth::observe and SystemHealth::observe to health_metrics

* fix errors

* nitpick `Cargo.toml`s

---------

Co-authored-by: Daniel Knopik <daniel@dknopik.de>
# Conflicts:
#	Cargo.toml
This commit is contained in:
Daniel Knopik
2025-01-16 02:48:50 +01:00
committed by GitHub
parent b1a19a8b20
commit 669932aa67
43 changed files with 303 additions and 315 deletions

View File

@@ -5,7 +5,8 @@ pub mod recover;
use crate::WALLETS_DIR_FLAG;
use clap::{Arg, ArgAction, ArgMatches, Command};
use clap_utils::FLAG_HEADER;
use directory::{ensure_dir_exists, parse_path_or_default_with_flag, DEFAULT_WALLET_DIR};
use directory::{parse_path_or_default_with_flag, DEFAULT_WALLET_DIR};
use std::fs::create_dir_all;
use std::path::PathBuf;
pub const CMD: &str = "wallet";
@@ -44,7 +45,7 @@ pub fn cli_run(matches: &ArgMatches) -> Result<(), String> {
} else {
parse_path_or_default_with_flag(matches, WALLETS_DIR_FLAG, DEFAULT_WALLET_DIR)?
};
ensure_dir_exists(&wallet_base_dir)?;
create_dir_all(&wallet_base_dir).map_err(|_| "Could not create wallet base dir")?;
eprintln!("wallet-dir path: {:?}", wallet_base_dir);