fixed clippy issues

This commit is contained in:
objz committed 2026-06-16 10:35:34 +02:00
1 parent db23b86dca
commit 3d7f233e27
2 files changed
+6 -9

No files matched your search

+2 -3
View File
@@ -22,15 +22,14 @@ pub fn get_config_path() -> PathBuf {
fn ensure_config_exists() -> PathBuf {
let config_path = get_config_path().join("config.toml");
if !config_path.exists() {
if let Some(parent) = config_path.parent() {
if let Err(e) = fs::create_dir_all(parent) {
if let Some(parent) = config_path.parent()
&& let Err(e) = fs::create_dir_all(parent) {
tracing::warn!(
"Failed to create config directory {}: {}",
parent.display(),
e
);
}
}
match fs::write(&config_path, include_str!("../../assets/config.toml")) {
Ok(()) => tracing::debug!("Wrote default config to {}", config_path.display()),
Err(e) => tracing::warn!(