Skip to content

Commit c96ea3e

Browse files
committed
Fix a Sendability warning
1 parent f1f7131 commit c96ea3e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Tests/StreamReaderTests/URLStreamReaderTests.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,8 @@ class URLStreamReaderTests : XCTestCase {
8686
// XCTAssertThrowsError(try reader2.readData(size: 1, allowReadingLess: false))
8787
// }
8888

89-
class SessionDelegate : NSObject, URLSessionDelegate, URLSessionDataDelegate, URLSessionStreamDelegate {
89+
/* This is not really Sendable, but we (probably) use it correctly… */
90+
fileprivate final class SessionDelegate : NSObject, URLSessionDelegate, URLSessionDataDelegate, URLSessionStreamDelegate {
9091

9192
let group: DispatchGroup
9293

@@ -117,5 +118,8 @@ class URLStreamReaderTests : XCTestCase {
117118
}
118119

119120
}
121+
#if swift(>=5.5)
122+
extension URLStreamReaderTests.SessionDelegate : @unchecked Sendable {}
123+
#endif
120124

121125
#endif

0 commit comments

Comments
 (0)