Skip to content

Commit 9a060dc

Browse files
committed
Win32_System_Registry
1 parent 9ef3d8d commit 9a060dc

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

lib/bencher_context/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ uuid = { workspace = true, optional = true, features = ["serde"] }
2323
[target.'cfg(target_os = "windows")'.dependencies]
2424
windows = { version = "0.60", optional = true, features = [
2525
"System_Profile_SystemManufacturers",
26-
"Win32",
26+
"Win32_System_Registry",
2727
] }
2828

2929
[lints]

lib/bencher_context/src/client/platform/target_os/windows.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ use std::cmp;
33
use uuid::Uuid;
44
use windows::{
55
core::PCWSTR,
6-
Win32::{
7-
Foundation::HKEY_LOCAL_MACHINE,
8-
System::Registry::{RegCloseKey, RegOpenKeyExW, RegQueryValueExW, KEY_READ},
6+
System::Profile::SystemManufacturers::SmbiosInformation,
7+
Win32::System::Registry::{
8+
RegCloseKey, RegOpenKeyExW, RegQueryValueExW, HKEY_LOCAL_MACHINE, KEY_READ,
99
},
1010
};
1111

@@ -18,7 +18,7 @@ impl crate::Fingerprint {
1818
}
1919

2020
fn serial_number() -> Option<Uuid> {
21-
windows::System::Profile::SystemManufacturers::SmbiosInformation::SerialNumber()
21+
SmbiosInformation::SerialNumber()
2222
.ok()
2323
.as_ref()
2424
.and_then(|uuid| Uuid::parse_str(&uuid.to_string().trim()).ok())

0 commit comments

Comments
 (0)