Skip to content

Commit

Permalink
Fix clippy warning
Browse files Browse the repository at this point in the history
  • Loading branch information
sile committed Mar 22, 2024
1 parent de6a3e2 commit b49d8e7
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/widget/color_selector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,7 @@ impl Widget for ColorSelectorWidget {

let old_background_mode = self.background.body().is_on();
self.background.handle_event(app, event).or_fail()?;
if self.background.body().is_on()
&& (old_background_mode == false || old_color != new_color)
{
if self.background.body().is_on() && (!old_background_mode || old_color != new_color) {
if new_color.a == 0 {
app.models_mut().config.background_color = None;
} else {
Expand Down

0 comments on commit b49d8e7

Please sign in to comment.