Reputation: 58
I'm new to swift and I dont understand what these errors mean, wondering if anyone can suggest how to fix these, thanks in advance.
struct Place: Hashable, Identifiable, Codable {
var placeName: String
var regularEvents:[WeeklyEvent]
}
I get the error type 'Place' does not conform to protocol 'Equatable'
Upvotes: 0
Views: 48
Reputation: 2778
The error comes because of this var weeklyEvents:[WeeklyEvent]
You need to define
WeeklyEvent` struct
struct WeeklyEvent: Codable, Hashable {
//your properties
}
Upvotes: 1