Skip to content

Commit 11b98aa

Browse files
committed
Use hasher
1 parent 5a4fe42 commit 11b98aa

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Sources/Puree/LogEntry.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ public struct LogEntry: Codable, Hashable {
66
public var date: Date
77
public var userData: Data?
88

9-
public var hashValue: Int {
10-
return identifier.hashValue
9+
public func hash(into hasher: inout Hasher) {
10+
hasher.combine(identifier)
1111
}
1212

1313
public static func == (lhs: LogEntry, rhs: LogEntry) -> Bool {

Sources/Puree/Output/BufferedOutput.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ open class BufferedOutput: Output {
2626
return lhs.logs == rhs.logs
2727
}
2828

29-
public var hashValue: Int {
30-
return logs.hashValue
29+
public func hash(into hasher: inout Hasher) {
30+
hasher.combine(logs)
3131
}
3232
}
3333
public struct Configuration {

0 commit comments

Comments
 (0)