Skip to content

Commit d277db8

Browse files
committed
fix: Correct type reference for risk level in NetworkInspector and adjust category access in PerformanceCoordinator
1 parent 4a55f25 commit d277db8

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎Nick/Core/NetworkAnalyzer/NetworkInspector.swift‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ final class NetworkInspector {
208208
}
209209

210210
device.issues = issues
211-
let riskWhenNotSafe: RiskLevel = issues.count >= 2 ? .risky : .review
211+
let riskWhenNotSafe: NetworkDevice.RiskLevel = issues.count >= 2 ? .risky : .review
212212
device.riskLevel = issues.isEmpty ? .safe : riskWhenNotSafe
213213
}
214214

@@ -229,7 +229,7 @@ final class NetworkInspector {
229229

230230
// Nested function rather than a closure so the withLock call inside
231231
// does not add a third level of closure nesting.
232-
func finish(_ result: Bool) {
232+
@Sendable func finish(_ result: Bool) {
233233
let shouldResume = resumed.withLock { alreadyResumed -> Bool in
234234
guard !alreadyResumed else { return false }
235235
alreadyResumed = true

‎Nick/Core/PerformanceEngine/PerformanceCoordinator.swift‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ final class PerformanceCoordinator {
7878
allItems.append(contentsOf: batch)
7979
completed += 1
8080
let progress = Double(completed) / Double(ruleCount)
81-
scanState = .scanning(progress: progress, currentCategory: batch.first?.category?.displayName)
81+
scanState = .scanning(progress: progress, currentCategory: batch.first?.category.displayName)
8282
}
8383
}
8484
return allItems

0 commit comments

Comments
 (0)