Skip to content

Commit 6f1360d

Browse files
committed
Fixed Swift 4 compilation
1 parent 9ba0f02 commit 6f1360d

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

Tests/TLVCodingTests/TLVCodingTests.swift

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ public struct ProvisioningState: Codable, Equatable {
183183

184184
internal extension ProvisioningState {
185185

186-
enum CodingKeys: UInt8, TLVCodingKey {
186+
enum CodingKeys: UInt8, TLVCodingKey, CaseIterable {
187187

188188
case state = 0x01
189189
case result = 0x02
@@ -201,8 +201,12 @@ extension ProvisioningState.CodingKeys {
201201
}
202202

203203
#if swift(>=4.2)
204-
extension ProvisioningState: CaseIterable { }
205204
#else
205+
protocol CaseIterable: Hashable {
206+
207+
static var allCases: Set<Self> { get }
208+
}
209+
206210
extension ProvisioningState.CodingKeys {
207211

208212
static let allCases: Set<ProvisioningState.CodingKeys> = [.state, .result]

0 commit comments

Comments
 (0)