From bfc648553fee4f378eacfc6bd12dcfcf4b688652 Mon Sep 17 00:00:00 2001 From: Marshall Bowers Date: Sun, 3 Mar 2024 10:34:30 -0500 Subject: [PATCH] Enable `clippy::bool_comparison` (#8769) This PR enables the [`clippy::bool_comparison`](https://rust-lang.github.io/rust-clippy/master/index.html#/bool_comparison) rule and fixes the outstanding violations. Release Notes: - N/A --- crates/terminal/src/terminal.rs | 24 ++++++++++++------------ tooling/xtask/src/main.rs | 1 - 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/crates/terminal/src/terminal.rs b/crates/terminal/src/terminal.rs index bb388a3510..2ae53d40d2 100644 --- a/crates/terminal/src/terminal.rs +++ b/crates/terminal/src/terminal.rs @@ -487,21 +487,21 @@ impl TerminalBuilder { } } - if events.is_empty() && wakeup == false { + if events.is_empty() && !wakeup { smol::future::yield_now().await; break 'outer; - } else { - terminal.update(&mut cx, |this, cx| { - if wakeup { - this.process_event(&AlacTermEvent::Wakeup, cx); - } - - for event in events { - this.process_event(&event, cx); - } - })?; - smol::future::yield_now().await; } + + terminal.update(&mut cx, |this, cx| { + if wakeup { + this.process_event(&AlacTermEvent::Wakeup, cx); + } + + for event in events { + this.process_event(&event, cx); + } + })?; + smol::future::yield_now().await; } } diff --git a/tooling/xtask/src/main.rs b/tooling/xtask/src/main.rs index 45e5241160..2862d27d51 100644 --- a/tooling/xtask/src/main.rs +++ b/tooling/xtask/src/main.rs @@ -80,7 +80,6 @@ fn run_clippy(args: ClippyArgs) -> Result<()> { "clippy::almost_complete_range", "clippy::arc_with_non_send_sync", "clippy::await_holding_lock", - "clippy::bool_comparison", "clippy::borrow_deref_ref", "clippy::borrowed_box", "clippy::cast_abs_to_unsigned",