vec: rework part 3

This commit is contained in:
nym21
2025-04-10 01:11:52 +02:00
parent 41cf0225e3
commit 0dd7e9359e
12 changed files with 84 additions and 42 deletions
+4 -3
View File
@@ -272,9 +272,10 @@ impl RunConfig {
}
fn read(path: &Path) -> Self {
fs::read_to_string(path).map_or_else(RunConfig::default, |contents| {
toml::from_str(&contents).unwrap_or_default()
})
fs::read_to_string(path).map_or_else(
|_| RunConfig::default(),
|contents| toml::from_str(&contents).unwrap_or_default(),
)
}
fn write(&self, path: &Path) -> std::io::Result<()> {