Parcourir la source

Wrap @unchecked Sendable in compiler check.

Jon Shier il y a 2 ans
Parent
commit
49af2935da
1 fichiers modifiés avec 2 ajouts et 0 suppressions
  1. 2 0
      Source/Concurrency.swift

+ 2 - 0
Source/Concurrency.swift

@@ -701,6 +701,7 @@ public struct StreamOf<Element>: AsyncSequence {
     }
 }
 
+#if compiler(>=5.7.0)
 extension DataRequest: @unchecked Sendable {}
 extension UploadRequest: @unchecked Sendable {}
 extension DownloadRequest: @unchecked Sendable {}
@@ -708,5 +709,6 @@ extension DataStreamRequest: @unchecked Sendable {}
 extension AFError: @unchecked Sendable {}
 extension DataResponse: @unchecked Sendable where Success: Sendable, Failure: Sendable {}
 extension DownloadResponse: @unchecked Sendable where Success: Sendable, Failure: Sendable {}
+#endif
 
 #endif