We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0d9b8ac commit 5a933b1Copy full SHA for 5a933b1
src/scheduler/scheduler.rs
@@ -95,11 +95,10 @@ impl Scheduler {
95
96
/// determine the next task, which is ready and priority is a greater than or equal to prio
97
fn get_next_task(&mut self, prio: TaskPriority) -> Option<Rc<RefCell<Task>>> {
98
- let lsb = self.prio_bitmap.lowest_one();
99
let mut task = None;
100
101
- if let Some(i) = lsb {
102
- let i = i as usize;
+ if let Some(i) = self.prio_bitmap.lowest_one() {
+ let i: usize = i.try_into().unwrap();
103
if i <= prio.into().into() {
104
task = self.ready_queues[i].pop();
105
0 commit comments