Skip to content

Commit

Permalink
fix clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
mitoma committed Dec 22, 2024
1 parent 8d3fad3 commit 811b21c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ui_support/src/action/system.rs
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,8 @@ impl ActionProcessor for SystemChangeBackgroundImage {
) -> InputResult {
match arg {
ActionArgument::String(path) => {
let image = image::open(path).expect(&format!("Failed to open image: {}", path));
let image =
image::open(path).unwrap_or_else(|_| panic!("Failed to open image: {}", path));
InputResult::ChangeBackgroundImage(Some(image))
}
_ => InputResult::ChangeBackgroundImage(None),
Expand Down

0 comments on commit 811b21c

Please sign in to comment.