From 47cdef5c072dafff7491fad4c366aab897a460e5 Mon Sep 17 00:00:00 2001 From: Maurice Parker Date: Thu, 9 Apr 2020 11:20:53 -0500 Subject: [PATCH] Fix hashable implementation that could have in theory had collisions. --- Frameworks/Account/FeedIdentifier.swift | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Frameworks/Account/FeedIdentifier.swift b/Frameworks/Account/FeedIdentifier.swift index eed0a7555..842963e74 100644 --- a/Frameworks/Account/FeedIdentifier.swift +++ b/Frameworks/Account/FeedIdentifier.swift @@ -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) } }