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