Skip to content

Commit b75cdb4

Browse files
committed
Add Hashable conditional conformance
1 parent 7417376 commit b75cdb4

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

Sources/DefaultCodable/Default.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ public struct Default<Provider: DefaultValueProvider>: Codable {
2424
}
2525

2626
extension Default: Equatable where Provider.Value: Equatable {}
27+
extension Default: Hashable where Provider.Value: Hashable {}
2728

2829
public extension KeyedDecodingContainer {
2930
func decode<P>(_: Default<P>.Type, forKey key: Key) throws -> Default<P> {

Tests/DefaultCodableTests/DefaultTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ final class DefaultTests: XCTestCase {
66
case foo, bar, baz
77
}
88

9-
private struct Thing: Codable, Equatable {
9+
private struct Thing: Codable, Hashable {
1010
var name: String
1111

1212
@Default<Empty> var description: String

0 commit comments

Comments
 (0)