Skip to content

Commit 4c0d407

Browse files
committed
Precise available OS version conditions in FileHandle throwing legacy functions.
1 parent 287947b commit 4c0d407

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Sources/GoogleCloudLogging/GoogleCloudLogHandler.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -459,23 +459,23 @@ extension FileHandle {
459459

460460
@discardableResult
461461
func legacySeekToEnd() throws -> UInt64 {
462-
if #available(OSX 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) {
462+
if #available(OSX 10.15, iOS 13.4, watchOS 6.2, tvOS 13.4, *) {
463463
return try seekToEnd()
464464
} else {
465465
return seekToEndOfFile()
466466
}
467467
}
468468

469469
func legacyWrite<T>(contentsOf data: T) throws where T : DataProtocol {
470-
if #available(OSX 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) {
470+
if #available(OSX 10.15, iOS 13.4, watchOS 6.2, tvOS 13.4, *) {
471471
try write(contentsOf: data)
472472
} else {
473473
write(Data(data))
474474
}
475475
}
476476

477477
func legacyReadToEnd() throws -> Data? {
478-
if #available(OSX 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) {
478+
if #available(OSX 10.15, iOS 13.4, watchOS 6.2, tvOS 13.4, *) {
479479
return try readToEnd()
480480
} else {
481481
return readDataToEndOfFile()

0 commit comments

Comments
 (0)