From 704bffc7d2c1436ea27e01469bf397cb56e94b23 Mon Sep 17 00:00:00 2001 From: Brent Simmons Date: Thu, 30 Apr 2020 11:42:52 -0700 Subject: [PATCH] Use explicit == func for Article. --- Frameworks/Articles/Article.swift | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Frameworks/Articles/Article.swift b/Frameworks/Articles/Article.swift index 6e13633cc..855df90bd 100644 --- a/Frameworks/Articles/Article.swift +++ b/Frameworks/Articles/Article.swift @@ -61,6 +61,12 @@ public struct Article: Hashable { public func hash(into hasher: inout Hasher) { hasher.combine(articleID) } + + // MARK: - Equatable + + static public func ==(lhs: Article, rhs: Article) -> Bool { + return lhs.articleID == rhs.articleID && lhs.accountID == rhs.accountID && lhs.webFeedID == rhs.webFeedID && lhs.uniqueID == rhs.uniqueID && lhs.title == rhs.title && lhs.contentHTML == rhs.contentHTML && lhs.contentText == rhs.contentText && lhs.url == rhs.url && lhs.externalURL == rhs.externalURL && lhs.summary == rhs.summary && lhs.imageURL == rhs.imageURL && lhs.datePublished == rhs.datePublished && lhs.dateModified == rhs.dateModified && lhs.authors == rhs.authors + } } public extension Set where Element == Article {