Skip to content

Commit e0b7378

Browse files
ivanvorobeiclaude
andcommitted
Fix Swift 6 strict concurrency errors
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 1389f9a commit e0b7378

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

Sources/SwiftBoost/Foundation/Delay.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import Foundation
22

3-
public func delay(_ delay: TimeInterval, closure: @escaping ClosureVoid) {
3+
public func delay(_ delay: TimeInterval, closure: @escaping @Sendable () -> Void) {
44
let when = DispatchTime.now() + delay
55
DispatchQueue.main.asyncAfter(deadline: when) {
66
closure()

Sources/SwiftBoost/Foundation/Extensions/URLSessionExtension.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public extension URLSession {
5757
method: HTTPMethod,
5858
body: [String: Any?]? = nil,
5959
contentTypeHeader: ContentType? = nil,
60-
completion: @escaping (AppError?, Data?, HTTPURLResponse?) -> Void
60+
completion: @escaping @Sendable (AppError?, Data?, HTTPURLResponse?) -> Void
6161
) {
6262
guard let url = URL(string: url) else {
6363
completion(AppError.invalidURL(url), nil, nil)

Sources/SwiftBoost/Foundation/Logger.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public enum Logger {
7878
var levels: [Level] = []
7979
var fileNameMode: FileNameMode = .show
8080

81-
static var shared = Configurator()
81+
nonisolated(unsafe) static var shared = Configurator()
8282
private init() {}
8383
}
8484
}

0 commit comments

Comments
 (0)