Skip to content

Commit ac99d6e

Browse files
Dylan Wolffsarsko
authored andcommitted
clippies
1 parent cceb93a commit ac99d6e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

shuttle/src/runtime/thread/continuation.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
use crate::runtime::execution::ExecutionState;
2+
use crate::sync::time::get_time_model;
23
use crate::{ContinuationFunctionBehavior, UNGRACEFUL_SHUTDOWN_CONFIG};
34
use corosensei::Yielder;
45
use corosensei::{stack::DefaultStack, Coroutine, CoroutineResult};
5-
use crate::sync::time::get_time_model;
66
use scoped_tls::scoped_thread_local;
77
use std::cell::{Cell, RefCell};
88
use std::collections::VecDeque;

shuttle/tests/basic/time.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ fn test_frozen_trigger_timeouts() {
213213
assert!(!spin_switch_and_get_any(|| woken.load(Ordering::SeqCst)));
214214

215215
// Trigger timeouts for tasks with "target" label
216-
trigger_timeouts(|labels| labels.get::<TaskType>().map_or(false, |t| t.0 == "target"));
216+
trigger_timeouts(|labels| labels.get::<TaskType>().is_some_and(|t| t.0 == "target"));
217217

218218
// Verify the task completed after trigger_timeouts
219219
assert!(spin_switch_and_get_any(|| woken.load(Ordering::SeqCst)));
@@ -251,7 +251,7 @@ fn test_frozen_trigger_timeouts_async_timeout() {
251251
assert!(!spin_switch_and_get_any(|| timeout_triggered.load(Ordering::SeqCst)));
252252

253253
// Trigger timeouts for tasks with "target" label
254-
trigger_timeouts(|labels| labels.get::<TaskType>().map_or(false, |t| t.0 == "target"));
254+
trigger_timeouts(|labels| labels.get::<TaskType>().is_some_and(|t| t.0 == "target"));
255255

256256
// Verify the timeout was triggered
257257
assert!(spin_switch_and_get_any(|| timeout_triggered.load(Ordering::SeqCst)));
@@ -285,7 +285,7 @@ fn test_frozen_trigger_timeouts_selective() {
285285
assert!(!spin_switch_and_get_any(|| other_woken.load(Ordering::SeqCst)));
286286

287287
// Trigger timeouts only for "target" tasks, not "other" tasks
288-
trigger_timeouts(|labels| labels.get::<TaskType>().map_or(false, |t| t.0 == "target"));
288+
trigger_timeouts(|labels| labels.get::<TaskType>().is_some_and(|t| t.0 == "target"));
289289

290290
// Verify the "other" task is still sleeping (not woken by selective trigger)
291291
assert!(!spin_switch_and_get_any(|| other_woken.load(Ordering::SeqCst)));

0 commit comments

Comments
 (0)