Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ extern crate std;
#[cfg(feature = "display")]
pub mod display;
mod extended;
pub mod uarch;
#[cfg(test)]
mod tests;

Expand Down Expand Up @@ -94,6 +95,7 @@ pub mod native_cpuid {
edx: result.edx,
}
}

/// The native reader uses the cpuid instruction to read the cpuid data from the
/// CPU we're currently running on directly.
#[derive(Clone, Copy)]
Expand Down Expand Up @@ -185,16 +187,17 @@ pub trait CpuIdReader: Clone {
}

impl<F> CpuIdReader for F
where
F: Fn(u32, u32) -> CpuIdResult + Clone,
where
F: Fn(u32, u32) -> CpuIdResult + Clone,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this from cargo fmt?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will check, but I would bet on my IDE running rustfmt. (JetBrain’s Rust Rover)

{
fn cpuid2(&self, eax: u32, ecx: u32) -> CpuIdResult {
self(eax, ecx)
}
}

#[non_exhaustive]
#[derive(Debug, Eq, PartialEq, Clone, Copy)]
enum Vendor {
pub enum Vendor {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should try to have docs for all public types

Intel,
Amd,
Unknown(u32, u32, u32),
Expand Down
Loading