Use custom has(into) and == functions for FeedListFolder.

This commit is contained in:
Brent Simmons 2018-08-25 16:52:57 -07:00
parent 24a6fae370
commit 37ace321e8
1 changed files with 12 additions and 0 deletions

View File

@ -23,4 +23,16 @@ final class FeedListFolder: Hashable, DisplayNameProvider {
self.name = name self.name = name
self.feeds = feeds 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
}
} }