fix: fixed swiftlint errors

This commit is contained in:
Serhiy Mytrovtsiy
2022-07-10 12:45:38 +02:00
parent 58ed03125f
commit 07b29a41cb
3 changed files with 3 additions and 2 deletions

View File

@@ -109,7 +109,7 @@ public class LineChart: WidgetWrapper {
if preview {
var list: [Double] = []
for _ in 0..<16 {
list.append(Double(CGFloat(Float(arc4random()) / Float(UINT32_MAX))))
list.append(Double.random(in: 0..<1))
}
self.chart.points = list
self.value = 0.38

View File

@@ -225,7 +225,7 @@ internal class DevicesReader: Reader<[BLEDevice]>, CBCentralManagerDelegate, CBP
// MARK: - system_profiler
private func profilerDevices() -> ([bleDevice], [String]) {
if #available(macOS 11, *) {} else { return ([], []) }
if #unavailable(macOS 11) { return ([], []) }
guard let res = process(path: "/usr/sbin/system_profiler", arguments: ["SPBluetoothDataType", "-json"]) else {
return ([], [])

View File

@@ -29,6 +29,7 @@ extension CWPHYMode: CustomStringConvertible {
case .mode11b: return "802.11b"
case .mode11g: return "802.11g"
case .mode11n: return "802.11n"
case .mode11ax: return "802.11ax"
case .modeNone: return "none"
@unknown default: return "unknown"
}