diff --git a/daemon/Cargo.toml b/daemon/Cargo.toml index 1aae737..e30a161 100644 --- a/daemon/Cargo.toml +++ b/daemon/Cargo.toml @@ -10,7 +10,7 @@ repository = "https://github.com/danyspin97/wpaperd" license = "GPL-3.0+" keywords = ["wallpaper", "wayland", "wlroots"] categories = ["command-line-utilities", "multimedia"] -rust-version = "1.61.0" +rust-version = "1.63.0" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/daemon/src/config.rs b/daemon/src/config.rs index 2cf558a..ec8b2fa 100644 --- a/daemon/src/config.rs +++ b/daemon/src/config.rs @@ -178,16 +178,16 @@ impl Config { pub fn new_from_path(path: &Path) -> Result { ensure!(path.exists(), "File {path:?} does not exists"); let mut config: Self = toml::from_str(&fs::read_to_string(path)?)?; - config.default = config + config .data .get("default") .unwrap_or(&SerializedWallpaperInfo::default()) - .to_owned(); - config.any = config + .clone_into(&mut config.default); + config .data .get("any") .unwrap_or(&SerializedWallpaperInfo::default()) - .to_owned(); + .clone_into(&mut config.any); config.data.retain(|name, info| { // The default configuration does not follow these rules // We still need the default configuration here because the path needs to be cached