chore: Remove toml prefix from CliConfig::{load,dump}_toml
Signed-off-by: Awiteb <a@4rs.nl>
This commit is contained in:
@@ -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()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -64,6 +64,6 @@ impl CommandRunner for RemoveArgs {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
options.config.dump_toml()
|
options.config.dump()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -65,6 +65,6 @@ impl CommandRunner for UpdateArgs {
|
|||||||
set.naddrs.extend(naddrs);
|
set.naddrs.extend(naddrs);
|
||||||
}
|
}
|
||||||
|
|
||||||
options.config.dump_toml()
|
options.config.dump()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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()?;
|
||||||
|
|
||||||
|
|||||||
@@ -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)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user