mirror of
https://github.com/apple/swift-http-types
synced 2026-11-30 05:18:47 +00:00
Add FoundationURL trait (#118)
Add a default enabled trait "FoundationURL" that can be disabled for users who don't want Foundation dependencies. Also enable `InternalImportsByDefault`.
This commit is contained in:
1 parent
bfafc0b613
commit
f14fbc0e56
11 files changed
+140
-15
No files matched your search
@@ -12,10 +12,12 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#if FoundationURL
|
||||
|
||||
#if canImport(FoundationEssentials)
|
||||
import FoundationEssentials
|
||||
public import FoundationEssentials
|
||||
#else // canImport(FoundationEssentials)
|
||||
import Foundation
|
||||
public import Foundation
|
||||
#if canImport(CoreFoundation)
|
||||
import CoreFoundation
|
||||
#endif // canImport(CoreFoundation)
|
||||
@@ -214,3 +216,5 @@ extension URL {
|
||||
#endif // !canImport(FoundationEssentials) && canImport(CoreFoundation)
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in new issue
Block a user