blob: c8cb2f6114a80def6b58e0cd4604e5fba7ddc286 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
import Foundation
struct PostWithContext: Hashable {
let post: BooruPost
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 {
lhs.post.id == rhs.post.id
}
}
|