diff options
Diffstat (limited to 'Sora/Data/PostWithContext.swift')
| -rw-r--r-- | Sora/Data/PostWithContext.swift | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/Sora/Data/PostWithContext.swift b/Sora/Data/PostWithContext.swift index c8cb2f6..b98a191 100644 --- a/Sora/Data/PostWithContext.swift +++ b/Sora/Data/PostWithContext.swift @@ -2,18 +2,14 @@ import Foundation struct PostWithContext: Hashable { let post: BooruPost + // swiftlint:disable:next discouraged_optional_collection let posts: [BooruPost]? - init(post: BooruPost, posts: [BooruPost]?) { - self.post = post - self.posts = posts - } - func hash(into hasher: inout Hasher) { hasher.combine(post.id) } - static func == (lhs: PostWithContext, rhs: PostWithContext) -> Bool { + static func == (lhs: Self, rhs: Self) -> Bool { lhs.post.id == rhs.post.id } } |