Auto-fix clippy::collapsible_if violations (#36428)
Release Notes: - N/A
This commit is contained in:
@@ -78,11 +78,11 @@ impl TestDispatcher {
|
||||
let state = self.state.lock();
|
||||
let next_due_time = state.delayed.first().map(|(time, _)| *time);
|
||||
drop(state);
|
||||
if let Some(due_time) = next_due_time {
|
||||
if due_time <= new_now {
|
||||
self.state.lock().time = due_time;
|
||||
continue;
|
||||
}
|
||||
if let Some(due_time) = next_due_time
|
||||
&& due_time <= new_now
|
||||
{
|
||||
self.state.lock().time = due_time;
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -201,10 +201,10 @@ impl TestPlatform {
|
||||
executor
|
||||
.spawn(async move {
|
||||
if let Some(previous_window) = previous_window {
|
||||
if let Some(window) = window.as_ref() {
|
||||
if Rc::ptr_eq(&previous_window.0, &window.0) {
|
||||
return;
|
||||
}
|
||||
if let Some(window) = window.as_ref()
|
||||
&& Rc::ptr_eq(&previous_window.0, &window.0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
previous_window.simulate_active_status_change(false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user