tighten visibility and clear the remaining mechanical lint noise

This commit is contained in:
2026-09-21 00:44:25 +03:00
parent 1332600148
commit 03b2fec744
11 changed files with 158 additions and 172 deletions
+3 -5
View File
@@ -169,8 +169,7 @@ impl Config {
// timestamped name collides for some reason.
let ts = std::time::SystemTime::now()
.duration_since(std::time::UNIX_EPOCH)
.map(|d| d.as_secs())
.unwrap_or(0);
.map_or(0, |d| d.as_secs());
let stem = path
.file_stem()
.and_then(|s| s.to_str())
@@ -211,7 +210,7 @@ impl Config {
}
}
pub fn config_path(app_dir: &Path) -> PathBuf {
pub(crate) fn config_path(app_dir: &Path) -> PathBuf {
app_dir.join("config.toml")
}
@@ -225,8 +224,7 @@ fn sweep_stale_backups(config_path: &Path) {
let Some(dir) = config_path.parent() else { return };
let now = std::time::SystemTime::now()
.duration_since(std::time::UNIX_EPOCH)
.map(|d| d.as_secs())
.unwrap_or(0);
.map_or(0, |d| d.as_secs());
let Ok(entries) = std::fs::read_dir(dir) else { return };
for entry in entries.flatten() {
let name = entry.file_name();