Provide hash(into:) functions where the default implementation might be doing too much work.

This commit is contained in:
Brent Simmons
2024-05-26 11:53:36 -07:00
parent 401050465e
commit e275367664
11 changed files with 78 additions and 5 deletions

View File

@@ -44,4 +44,9 @@ public struct SyncStatus: Hashable, Equatable, Sendable {
public func databaseDictionary() -> DatabaseDictionary {
return [DatabaseKey.articleID: articleID, DatabaseKey.key: key.rawValue, DatabaseKey.flag: flag, DatabaseKey.selected: selected]
}
public func hash(into hasher: inout Hasher) {
hasher.combine(articleID)
hasher.combine(key)
}
}