Swift Struct doesn’t conform to protocol Equatable?
Swift 4.1 (and above) Updated answer: Starting from Swift 4.1, all you have to is to conform to the Equatable protocol without the need of implementing the == method. See: SE-0185 – Synthesizing Equatable and Hashable conformance. Example: struct MyStruct: Equatable { var id: Int var value: String } let obj1 = MyStruct(id: 101, value: … Read more