compiles again

This commit is contained in:
🪞👃🪞 2025-09-02 22:39:04 +03:00
parent 34070de5f7
commit 1434adae09
21 changed files with 654 additions and 591 deletions

View file

@ -74,7 +74,7 @@ impl Config {
}
}
pub fn init (&mut self) -> Usually<()> {
self.init_file(Self::CONFIG, Self::DEFAULTS, |cfgs, dsl|cfgs.load(dsl))?;
self.init_file(Self::CONFIG, Self::DEFAULTS, |cfgs, dsl|cfgs.load(&dsl))?;
Ok(())
}
pub fn init_file (
@ -82,7 +82,7 @@ impl Config {
) -> Usually<()> {
if self.dirs.find_config_file(path).is_none() {
println!("Creating {path:?}");
std::fs::write(self.dirs.place_config_file(path)?, defaults);
std::fs::write(self.dirs.place_config_file(path)?, defaults)?;
}
Ok(if let Some(path) = self.dirs.find_config_file(path) {
println!("Loading {path:?}");