1 parent 9f58684 commit 147ff95Copy full SHA for 147ff95
1 file changed
Mist/Model/Hardware.swift
@@ -49,12 +49,10 @@ enum Hardware {
49
///
50
/// - Returns: The entity property for the provided key.
51
private static func registryProperty(for key: String) -> String? {
52
- let entry: io_service_t
53
-
54
- if #available(macOS 12.0, *) {
55
- entry = IOServiceGetMatchingService(kIOMainPortDefault, IOServiceMatching("IOPlatformExpertDevice"))
+ let entry: io_service_t = if #available(macOS 12.0, *) {
+ IOServiceGetMatchingService(kIOMainPortDefault, IOServiceMatching("IOPlatformExpertDevice"))
56
} else {
57
- entry = IOServiceGetMatchingService(kIOMasterPortDefault, IOServiceMatching("IOPlatformExpertDevice"))
+ IOServiceGetMatchingService(kIOMasterPortDefault, IOServiceMatching("IOPlatformExpertDevice"))
58
}
59
60
defer {
0 commit comments