refactor: simplify default implementation for Config struct

This commit is contained in:
2026-03-17 21:54:45 +01:00
parent 308867b2d9
commit 0c463703a3
2 changed files with 8 additions and 14 deletions

View File

@@ -126,18 +126,12 @@ impl Default for GeneralConfig {
}
#[derive(Debug, Deserialize, Clone)]
#[derive(Default)]
pub struct Config {
#[serde(default)]
pub general: GeneralConfig,
}
impl Default for Config {
fn default() -> Self {
Self {
general: GeneralConfig::default(),
}
}
}
fn validate(config: Config) -> Result<Config, ConfigError> {
if config.general.quality > 100 {