diff --git a/src/cli/commands/sets/new.rs b/src/cli/commands/sets/new.rs index 9640d0c..ddc6f04 100644 --- a/src/cli/commands/sets/new.rs +++ b/src/cli/commands/sets/new.rs @@ -52,6 +52,6 @@ impl CommandRunner for NewArgs { } options.config.sets.push_set(self.name, naddrs, relays)?; - options.config.dump_toml() + options.config.dump() } } diff --git a/src/cli/commands/sets/remove.rs b/src/cli/commands/sets/remove.rs index a1cd909..def354e 100644 --- a/src/cli/commands/sets/remove.rs +++ b/src/cli/commands/sets/remove.rs @@ -64,6 +64,6 @@ impl CommandRunner for RemoveArgs { } } - options.config.dump_toml() + options.config.dump() } } diff --git a/src/cli/commands/sets/update.rs b/src/cli/commands/sets/update.rs index 9368ce2..ddc864a 100644 --- a/src/cli/commands/sets/update.rs +++ b/src/cli/commands/sets/update.rs @@ -65,6 +65,6 @@ impl CommandRunner for UpdateArgs { set.naddrs.extend(naddrs); } - options.config.dump_toml() + options.config.dump() } } diff --git a/src/cli/config.rs b/src/cli/config.rs index 8eea84e..ed85985 100644 --- a/src/cli/config.rs +++ b/src/cli/config.rs @@ -80,7 +80,7 @@ pub struct RepoRelaySet { impl CliConfig { /// Reads and parse a TOML config file from the given path, creating it if /// missing. - pub fn load_toml(file_path: PathBuf) -> N34Result { + pub fn load(file_path: PathBuf) -> N34Result { tracing::info!(path = %file_path.display(), "Loading configuration from file"); // Make sure the file is exist if let Some(parent) = file_path.parent() { @@ -101,7 +101,7 @@ impl CliConfig { } /// Dump the config as toml in a file - pub fn dump_toml(mut self) -> N34Result<()> { + pub fn dump(mut self) -> N34Result<()> { tracing::debug!(config = ?self, "Writing configuration to {}", self.path.display()); self.post_sets()?; diff --git a/src/cli/parsers.rs b/src/cli/parsers.rs index 92070c0..c7f482e 100644 --- a/src/cli/parsers.rs +++ b/src/cli/parsers.rs @@ -67,5 +67,5 @@ pub fn parse_config_path(config_path: &str) -> N34Result { path = super::defaults::config_path()?; }; - CliConfig::load_toml(path) + CliConfig::load(path) }