diff --git a/src/config.rs b/src/config.rs index 6fecfd1..0a6e82b 100644 --- a/src/config.rs +++ b/src/config.rs @@ -8,18 +8,12 @@ use serde::{Deserialize, Serialize}; /// Hauptkonfigurationsstruktur der Anwendung. #[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] +#[derive(Default)] pub struct AppConfig { /// Allgemeine Einstellungen pub general: General, } -impl Default for AppConfig { - fn default() -> Self { - Self { - general: General::default(), - } - } -} /// Allgemeine Konfigurationseinstellungen. #[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] diff --git a/src/updater.rs b/src/updater.rs index b02dfa5..84b4911 100644 --- a/src/updater.rs +++ b/src/updater.rs @@ -111,15 +111,14 @@ pub fn run_compose_command(dir: &Path, args: &[&str]) -> std::io::Result || stderr.contains("unknown command \"compose\"") || stderr.contains("unknown command: compose")); - if is_unavailable { - if let Ok(fallback_out) = Command::new("docker-compose") + if is_unavailable + && let Ok(fallback_out) = Command::new("docker-compose") .current_dir(dir) .args(args) .output() { return Ok(fallback_out); } - } Ok(out) } Err(err) if err.kind() == std::io::ErrorKind::NotFound => {