Reputation: 5816
I've declared my struct to conform to Equatable
struct LocationInfo: Equatable {
// MARK: - Properties
let gatewayId: GatewayId?
let gatewaySerialNumber: String?
let locationId: LocationId
let locationName: String
let role: UserRoleModel
var rooms: [RoomInfo]
let gateways: [GatewayInfo]
var devices: [any DeviceInfoProtocol]
let devicesGroups: [DeviceGroupsInfo]
let membershipId: MembershipId?
let partners: [PartnerConnection]
let scripts: [AutomationScript]
all the types used are either String typealiases or Equatable or Hashable entities. All of them (I've checked and doublechecked). Why do I get
Type 'LocationInfo' does not conform to protocol 'Equatable'
and am therefore forced to implement == ?
Upvotes: 0
Views: 58