mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Fix hashable implementation that could have in theory had collisions.
This commit is contained in:
@@ -85,12 +85,16 @@ public enum FeedIdentifier: CustomStringConvertible, Hashable {
|
||||
public func hash(into hasher: inout Hasher) {
|
||||
switch self {
|
||||
case .smartFeed(let id):
|
||||
hasher.combine("smartFeed")
|
||||
hasher.combine(id)
|
||||
case .script(let id):
|
||||
hasher.combine("smartFeed")
|
||||
hasher.combine(id)
|
||||
case .webFeed(_, let webFeedID):
|
||||
hasher.combine("webFeed")
|
||||
hasher.combine(webFeedID)
|
||||
case .folder(_, let folderName):
|
||||
hasher.combine("folder")
|
||||
hasher.combine(folderName)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user