Skip to content

Commit

Permalink
Merge pull request #32 from vykut/billboardad-hashable
Browse files Browse the repository at this point in the history
Add Hashable conformance to BillboardAd
  • Loading branch information
hiddevdploeg authored Jul 5, 2024
2 parents 30b5dc4 + 5fc5a8c commit 7510f0a
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Sources/Billboard/Models/BillboardAd.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,16 @@
import Foundation
import SwiftUI

public struct BillboardAd : Codable, Identifiable, Hashable {

public struct BillboardAd : Codable, Identifiable, Equatable {

public static func == (lhs: BillboardAd, rhs: BillboardAd) -> Bool {
lhs.id == rhs.id
}


public func hash(into hasher: inout Hasher) {
hasher.combine(id)
}

public var id : String {
return "\(name)+\(appStoreID)"
}
Expand Down

0 comments on commit 7510f0a

Please sign in to comment.