mirror of
https://github.com/apple/swift-nio
synced 2026-11-25 04:47:49 +00:00
Split FoundationEssentials extensions from NIOFoundationCompat (#3567)
Split FoundationEssentials extensions from NIOFoundationCompat ### Motivation: Resolves #3038 ### Modifications: Split NIOFoundationCompat into two and only import FoundationEssentials and NIOFoundationEssentialsCompat where appropriate. ### Result: ByteBuffer/Codable extensions can be used without vendoring the code or linking to Foundation. Co-authored-by: Johannes Weiss <johannesweiss@apple.com> Co-authored-by: Fabian Fett <fabianfett@apple.com>
This commit is contained in:
8 files changed
+56
-7
No files matched your search
@@ -15,8 +15,12 @@
|
||||
#if canImport(Darwin) || os(Linux) || os(Android)
|
||||
import _NIOFileSystem
|
||||
import NIOCore
|
||||
import NIOFoundationCompat
|
||||
import NIOFoundationEssentialsCompat
|
||||
#if canImport(FoundationEssentials)
|
||||
import struct FoundationEssentials.Data
|
||||
#else
|
||||
import struct Foundation.Data
|
||||
#endif
|
||||
|
||||
@available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *)
|
||||
extension Data {
|
||||
|
||||
Reference in new issue
Block a user