style: cargo fmt kernel crates
This commit is contained in:
@@ -26,15 +26,26 @@ impl<P: Platform> Kernel<P> {
|
||||
self.scheduler.add(current_tid, priority, core);
|
||||
match self.scheduler.next(core) {
|
||||
Some(next) => {
|
||||
if self.threads.get_mut(next).and_then(|t| t.set_running(core)).is_ok() {
|
||||
if self
|
||||
.threads
|
||||
.get_mut(next)
|
||||
.and_then(|t| t.set_running(core))
|
||||
.is_ok()
|
||||
{
|
||||
SchedulerDecision::Preempt(next)
|
||||
} else {
|
||||
let _ = self.threads.get_mut(current_tid).map(|t| t.set_running(core));
|
||||
let _ = self
|
||||
.threads
|
||||
.get_mut(current_tid)
|
||||
.map(|t| t.set_running(core));
|
||||
SchedulerDecision::Continue
|
||||
}
|
||||
}
|
||||
None => {
|
||||
let _ = self.threads.get_mut(current_tid).map(|t| t.set_running(core));
|
||||
let _ = self
|
||||
.threads
|
||||
.get_mut(current_tid)
|
||||
.map(|t| t.set_running(core));
|
||||
SchedulerDecision::Continue
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user