Skip to content

Commit

Permalink
Use hasher
Browse files Browse the repository at this point in the history
  • Loading branch information
giginet committed Apr 1, 2019
1 parent 5a4fe42 commit 11b98aa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Sources/Puree/LogEntry.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ public struct LogEntry: Codable, Hashable {
public var date: Date
public var userData: Data?

public var hashValue: Int {
return identifier.hashValue
public func hash(into hasher: inout Hasher) {
hasher.combine(identifier)
}

public static func == (lhs: LogEntry, rhs: LogEntry) -> Bool {
Expand Down
4 changes: 2 additions & 2 deletions Sources/Puree/Output/BufferedOutput.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ open class BufferedOutput: Output {
return lhs.logs == rhs.logs
}

public var hashValue: Int {
return logs.hashValue
public func hash(into hasher: inout Hasher) {
hasher.combine(logs)
}
}
public struct Configuration {
Expand Down

0 comments on commit 11b98aa

Please sign in to comment.