Skip to content

Commit

Permalink
Apply cargo clippy fixes and raise MSRV
Browse files Browse the repository at this point in the history
  • Loading branch information
danyspin97 committed Jun 13, 2024
1 parent 0082898 commit d257731
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion daemon/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
8 changes: 4 additions & 4 deletions daemon/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -178,16 +178,16 @@ impl Config {
pub fn new_from_path(path: &Path) -> Result<Self> {
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
Expand Down

0 comments on commit d257731

Please sign in to comment.