Skip to content

Commit

Permalink
Replace unneeded if-let with .expect()
Browse files Browse the repository at this point in the history
  • Loading branch information
ryoqun committed Feb 29, 2024
1 parent 83e514a commit 0a85082
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions unified-scheduler-pool/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -606,9 +606,8 @@ impl<S: SpawnableScheduler<TH>, TH: TaskHandler> ThreadManager<S, TH> {
recv(dummy_receiver(state_machine.has_unblocked_task())) -> dummy => {
assert_matches!(dummy, Err(RecvError));

if let Some(task) = state_machine.schedule_unblocked_task() {
runnable_task_sender.send_payload(task).unwrap();
}
let task = state_machine.schedule_unblocked_task().expect("unblocked task");
runnable_task_sender.send_payload(task).unwrap();
},
recv(new_task_receiver) -> message => {
assert!(!session_ending);
Expand Down

0 comments on commit 0a85082

Please sign in to comment.