Resolve a huge portion of the clippy lints

This commit is contained in:
Speedy_Lex
2025-10-06 12:30:23 +00:00
committed by Jeremy Soller
parent db8fb14614
commit 0931a7f49f
57 changed files with 451 additions and 509 deletions
+4 -5
View File
@@ -1,6 +1,6 @@
///! This module provides a context-switching mechanism that utilizes a simple round-robin scheduler.
///! The scheduler iterates over available contexts, selecting the next context to run, while
///! handling process states and synchronization.
//! This module provides a context-switching mechanism that utilizes a simple round-robin scheduler.
//! The scheduler iterates over available contexts, selecting the next context to run, while
//! handling process states and synchronization.
use core::{
cell::{Cell, RefCell},
hint, mem,
@@ -16,7 +16,6 @@ use crate::{
cpu_set::LogicalCpuId,
cpu_stats,
percpu::PercpuBlock,
ptrace,
sync::CleanLockToken,
time,
};
@@ -208,7 +207,7 @@ pub fn switch(token: &mut CleanLockToken) -> SwitchResult {
// Check if the context is runnable and can be switched to.
if let UpdateResult::CanSwitch =
unsafe { update_runnable(&mut *next_context_guard, cpu_id) }
unsafe { update_runnable(&mut next_context_guard, cpu_id) }
{
// Store locks for previous and next context and break out from loop
// for the switch