Skip to content

Commit afa2987

Browse files
authored
Upgrade all support versions. (#57)
1 parent ce83da0 commit afa2987

File tree

6 files changed

+11
-20
lines changed

6 files changed

+11
-20
lines changed

.swift-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
4.2
1+
5.2

BinaryCodable.podspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ Pod::Spec.new do |s|
88
s.source = { :git => 'https://github.com/jverkoey/BinaryCodable.git', :tag => s.version }
99
s.documentation_url = 'https://github.com/jverkoey/BinaryCodable/'
1010

11-
s.ios.deployment_target = '12.0'
12-
s.osx.deployment_target = '10.12'
11+
s.ios.deployment_target = '13.0'
12+
s.osx.deployment_target = '10.15'
1313

1414
s.source_files = ['Sources/**/*.swift']
1515
end

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// swift-tools-version:4.2
1+
// swift-tools-version:5.2
22
// Copyright 2019-present the BinaryCodable authors. All Rights Reserved.
33
//
44
// Licensed under the Apache License, Version 2.0 (the "License");

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,10 @@ This is not an official Google product.
3939

4040
## Supported technologies
4141

42-
- iOS 12.0+ / macOS 10.12+
43-
- Xcode 10.1+
42+
- iOS 13.0+ / macOS 10.15+
43+
- Xcode 11.5+
4444
- Ubuntu 16.04
45-
- Swift 4.2.4
46-
- Swift 5.1.3
45+
- Swift 5.2
4746

4847
## License
4948

Sources/BinaryCodable/BinaryDataCoders/BinaryDataDecoder.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,8 @@ private class BinaryDataDecodingContainer: BinaryDecodingContainer {
111111
throw BinaryDecodingError.dataCorrupted(.init(debugDescription:
112112
"Not enough data to create a a type of \(type). Needed: \(byteWidth). Received: \(bytes.count)."))
113113
}
114-
let value = bytes.withUnsafeBytes { (ptr: UnsafePointer<T>) -> T in
115-
return ptr.pointee
114+
let value = bytes.withUnsafeBytes { ptr -> T in
115+
return ptr.load(as: T.self)
116116
}
117117
return value
118118
}
@@ -124,8 +124,8 @@ private class BinaryDataDecodingContainer: BinaryDecodingContainer {
124124
throw BinaryDecodingError.dataCorrupted(.init(debugDescription:
125125
"Not enough data to create a a type of \(type). Needed: \(byteWidth). Received: \(bytes.count)."))
126126
}
127-
let value = bytes.withUnsafeBytes { (ptr: UnsafePointer<T>) -> T in
128-
return ptr.pointee
127+
let value = bytes.withUnsafeBytes { ptr -> T in
128+
return ptr.load(as: T.self)
129129
}
130130
return value
131131
}

Tests/LinuxMain.swift

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)