Skip to content

Commit

Permalink
minor cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
warittornc committed Nov 29, 2024
1 parent 98118ca commit 321ae47
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bothan-api/server-cli/src/commands/config.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use anyhow::{anyhow, Context};
use clap::{Parser, Subcommand};
use std::fs;
use std::fs::{create_dir_all, write};
use std::path::PathBuf;

use bothan_api::config::manager::crypto_info::sources::CryptoSourceConfigs;
Expand Down Expand Up @@ -43,7 +43,7 @@ impl ConfigCli {
}

if let Some(parent) = config_path.parent() {
fs::create_dir_all(parent)
create_dir_all(parent)
.with_context(|| "Failed to create parent directories")?;
}

Expand All @@ -52,7 +52,7 @@ impl ConfigCli {

let config_str =
toml::to_string(&app_config).with_context(|| "Failed to serialize config")?;
fs::write(config_path, config_str)
write(config_path, config_str)
.with_context(|| "Failed to write config file")?;

Ok(())
Expand Down

0 comments on commit 321ae47

Please sign in to comment.