Skip to content

Commit c7fb775

Browse files
authored
Replace os() with canImport(Darwin) (#693)
* Replace os() with canImport(Darwin) * Remove compilation conditional since it'll always be true
1 parent 960af0d commit c7fb775

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

Sources/AsyncHTTPClient/Base64.swift

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -146,11 +146,6 @@ extension String {
146146
}
147147
}
148148

149-
// Frustratingly, Swift 5.3 shipped before the macOS 11 SDK did, so we cannot gate the availability of
150-
// this declaration on having the 5.3 compiler. This has caused a number of build issues. While updating
151-
// to newer Xcodes does work, we can save ourselves some hassle and just wait until 5.4 to get this
152-
// enhancement on Apple platforms.
153-
#if (compiler(>=5.3) && !(os(macOS) || os(iOS) || os(tvOS) || os(watchOS))) || compiler(>=5.4)
154149
extension String {
155150

156151
@inlinable
@@ -163,12 +158,3 @@ extension String {
163158
}
164159
}
165160
}
166-
#else
167-
extension String {
168-
@inlinable
169-
init(customUnsafeUninitializedCapacity capacity: Int,
170-
initializingUTF8With initializer: (_ buffer: UnsafeMutableBufferPointer<UInt8>) throws -> Int) rethrows {
171-
try self.init(backportUnsafeUninitializedCapacity: capacity, initializingUTF8With: initializer)
172-
}
173-
}
174-
#endif

0 commit comments

Comments
 (0)