From 37ace321e8a78663d91b693dc6c54a454097c2e8 Mon Sep 17 00:00:00 2001 From: Brent Simmons Date: Sat, 25 Aug 2018 16:52:57 -0700 Subject: [PATCH] Use custom has(into) and == functions for FeedListFolder. --- Evergreen/FeedList/FeedListFolder.swift | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Evergreen/FeedList/FeedListFolder.swift b/Evergreen/FeedList/FeedListFolder.swift index 1572fa9b0..668292104 100644 --- a/Evergreen/FeedList/FeedListFolder.swift +++ b/Evergreen/FeedList/FeedListFolder.swift @@ -23,4 +23,16 @@ final class FeedListFolder: Hashable, DisplayNameProvider { self.name = name self.feeds = feeds } + + // MARK: - Hashable + + public func hash(into hasher: inout Hasher) { + hasher.combine(name) + } + + // MARK: - Equatable + + static func ==(lhs: FeedListFolder, rhs: FeedListFolder) -> Bool { + return lhs.name == rhs.name && lhs.feeds == rhs.feeds + } }