Skip to content

Commit 921bcef

Browse files
committed
Ids are now Hashable
1 parent 661ff6e commit 921bcef

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Sources/JSONAPI/Resource/Id.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
/// Any type that you would like to be encoded to and
99
/// decoded from JSON API ids should conform to this
1010
/// protocol. Conformance for `String` is given.
11-
public protocol RawIdType: Codable, Equatable {}
11+
public protocol RawIdType: Codable, Hashable {}
1212

1313
/// If you would like to be able to create new
1414
/// Entities with Ids backed by a RawIdType then
@@ -32,7 +32,7 @@ public struct Unidentified<EntityDescription: JSONAPI.EntityDescription>: Identi
3232
public var description: String { return "Id(Unidentified)" }
3333
}
3434

35-
public protocol IdType: Identifier, CustomStringConvertible {
35+
public protocol IdType: Identifier, Hashable, CustomStringConvertible {
3636
associatedtype RawType: RawIdType
3737

3838
var rawValue: RawType { get }

0 commit comments

Comments
 (0)