Skip to content

Commit 8d08db2

Browse files
Updated conformance for Version to just be based on RawRepresentable
1 parent 3210693 commit 8d08db2

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

Sources/CodableDatastore/Datastore.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
import Foundation
1010

1111
public struct Datastore<
12-
Version: StringIndexable & Hashable & CaseIterable,
12+
Version: RawRepresentable & Hashable & CaseIterable,
1313
CodedType: Codable,
1414
IdentifierType: Indexable,
1515
AccessMode: _AccessMode
16-
> {
16+
> where Version.RawValue: Indexable {
1717
public init(
1818
persistence: any Persistence,
1919
key: String,

Sources/CodableDatastore/Indexed.swift

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@ import Foundation
1111
/// An alias representing the requirements for a property to be indexable, namely that they conform to both ``/Swift/Codable`` and ``/Swift/Comparable``.
1212
public typealias Indexable = Comparable & Codable
1313

14-
/// An alias representing the requirements for a type to be indexable, namely that they conform to both ``/Swift/LosslessStringConvertible`` and ``/Swift/Comparable``.
15-
public typealias StringIndexable = Comparable & LosslessStringConvertible
16-
1714
/// A property wrapper to mark a property as one that is indexable by a data store.
1815
///
1916
/// Indexable properties must be ``/Swift/Codable`` so that their values can be encoded and decoded,

0 commit comments

Comments
 (0)