Reduce usage of wildcard imports

This commit is contained in:
bjorn3
2026-04-06 15:05:54 +02:00
committed by Jeremy Soller
parent b0b0ec2d71
commit 89a29f4e56
5 changed files with 7 additions and 13 deletions
+3 -7
View File
@@ -1,8 +1,4 @@
use core::mem;
use crate::{memory::ArchIntCtx, panic, syscall::IntRegisters};
use super::super::flags::*;
use crate::{arch::flags::FLAG_SINGLESTEP, memory::ArchIntCtx, panic, syscall::IntRegisters};
#[derive(Default)]
#[repr(C, packed)]
@@ -121,8 +117,8 @@ impl InterruptStack {
if self.iret.cs & CPL_MASK == cs & CPL_MASK {
// Privilege ring didn't change, so neither did the stack
all.esp = self as *const Self as usize // esp after Self was pushed to the stack
+ mem::size_of::<Self>() // disregard Self
- mem::size_of::<usize>() * 2; // well, almost: esp and ss need to be excluded as they aren't present
+ size_of::<Self>() // disregard Self
- size_of::<usize>() * 2; // well, almost: esp and ss need to be excluded as they aren't present
unsafe {
core::arch::asm!("mov {}, ss", out(reg) all.ss);
}
+1 -1
View File
@@ -284,7 +284,7 @@ pub fn features() -> KcpuFeatures {
#[cfg(not(cpu_feature_never = "xsave"))]
mod xsave {
use super::*;
use spin::Once;
#[derive(Debug)]
pub struct XsaveInfo {
+1 -3
View File
@@ -1,6 +1,4 @@
use crate::{memory::ArchIntCtx, panic, syscall::IntRegisters};
use super::super::flags::*;
use crate::{arch::flags::FLAG_SINGLESTEP, memory::ArchIntCtx, panic, syscall::IntRegisters};
#[derive(Default)]
#[repr(C)]
+1 -1
View File
@@ -106,7 +106,7 @@ impl IrqScheme {
feature = "acpi",
any(target_arch = "x86", target_arch = "x86_64")
)) {
use crate::acpi::madt::*;
use crate::acpi::madt::{madt, MadtEntry};
match madt() {
Some(madt) => madt
+1 -1
View File
@@ -59,6 +59,7 @@ enum Kind {
Rd(fn(&mut CleanLockToken) -> Result<Vec<u8>>),
Wr(fn(&[u8], &mut CleanLockToken) -> Result<usize>),
}
use Kind::{Rd, Wr};
impl Kind {
fn generate_data(&self, token: &mut CleanLockToken) -> Result<Vec<u8>> {
match self {
@@ -67,7 +68,6 @@ impl Kind {
}
}
}
use Kind::*;
/// System information scheme
pub struct SysScheme;