chore: Remove toml prefix from CliConfig::{load,dump}_toml

Signed-off-by: Awiteb <a@4rs.nl>
This commit is contained in:
Awiteb
2025-06-07 19:01:53 +00:00
parent a6a61aedf1
commit 53a2eb5bda
5 changed files with 6 additions and 6 deletions

View File

@@ -52,6 +52,6 @@ impl CommandRunner for NewArgs {
} }
options.config.sets.push_set(self.name, naddrs, relays)?; options.config.sets.push_set(self.name, naddrs, relays)?;
options.config.dump_toml() options.config.dump()
} }
} }

View File

@@ -64,6 +64,6 @@ impl CommandRunner for RemoveArgs {
} }
} }
options.config.dump_toml() options.config.dump()
} }
} }

View File

@@ -65,6 +65,6 @@ impl CommandRunner for UpdateArgs {
set.naddrs.extend(naddrs); set.naddrs.extend(naddrs);
} }
options.config.dump_toml() options.config.dump()
} }
} }

View File

@@ -80,7 +80,7 @@ pub struct RepoRelaySet {
impl CliConfig { impl CliConfig {
/// Reads and parse a TOML config file from the given path, creating it if /// Reads and parse a TOML config file from the given path, creating it if
/// missing. /// missing.
pub fn load_toml(file_path: PathBuf) -> N34Result<Self> { pub fn load(file_path: PathBuf) -> N34Result<Self> {
tracing::info!(path = %file_path.display(), "Loading configuration from file"); tracing::info!(path = %file_path.display(), "Loading configuration from file");
// Make sure the file is exist // Make sure the file is exist
if let Some(parent) = file_path.parent() { if let Some(parent) = file_path.parent() {
@@ -101,7 +101,7 @@ impl CliConfig {
} }
/// Dump the config as toml in a file /// 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()); tracing::debug!(config = ?self, "Writing configuration to {}", self.path.display());
self.post_sets()?; self.post_sets()?;

View File

@@ -67,5 +67,5 @@ pub fn parse_config_path(config_path: &str) -> N34Result<CliConfig> {
path = super::defaults::config_path()?; path = super::defaults::config_path()?;
}; };
CliConfig::load_toml(path) CliConfig::load(path)
} }