Skip to content

Commit

Permalink
style: cleaning code
Browse files Browse the repository at this point in the history
  • Loading branch information
bpetit committed Nov 22, 2023
1 parent 9f8381e commit 746fa16
Show file tree
Hide file tree
Showing 3 changed files with 177 additions and 185 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ isahc = { version = "1.7.2", optional = true }
procfs = { version = "0.15.0" }

[target.'cfg(target_os="windows")'.dependencies]
windows = { version = "0.27.0", features = ["alloc","Win32_Storage_FileSystem","Win32_Foundation","Win32_Security","Win32_System_IO","Win32_System_Ioctl"]}
windows = { version = "0.27.0", features = ["alloc","Win32_Storage_FileSystem","Win32_Foundation","Win32_Security","Win32_System_IO","Win32_System_Ioctl","Win32_System_Threading", "Win32_System_SystemInformation"]}
windows-service = { version = "0.6.0" }
raw-cpuid = { version = "10.5.0" }
core_affinity = { version = "0.8.1"}
Expand Down
4 changes: 4 additions & 0 deletions src/sensors/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1048,6 +1048,10 @@ impl CPUSocket {
}
}

pub fn set_id(&mut self, id: u16) {
self.id = id
}

/// Adds a new Domain instance to the domains vector if and only if it doesn't exist in the vector already.
fn safe_add_domain(&mut self, domain: Domain) {
if !self.domains.iter().any(|d| d.id == domain.id) {
Expand Down
Loading

0 comments on commit 746fa16

Please sign in to comment.