Make LogItem not crash on init.

This commit is contained in:
Brent Simmons 2017-11-15 13:13:19 -08:00
parent 48ca636796
commit 3612469954
1 changed files with 3 additions and 2 deletions

View File

@ -23,8 +23,9 @@ public struct LogItem: Hashable {
self.type = type self.type = type
self.message = message self.message = message
self.date = Date() let date = Date()
self.hashValue = message.hashValue + self.date.hashValue self.date = date
self.hashValue = message.hashValue + date.hashValue
} }
static public func ==(lhs: LogItem, rhs: LogItem) -> Bool { static public func ==(lhs: LogItem, rhs: LogItem) -> Bool {