So what I'm trying to do is to update the annotations on a mapview
, but I want to put them into a Set first so to check for existing, new and removed annotations. I'm having some checking for conformance of the Hashable protocol
because of this
Protocol 'Hashable' can only be used as a generic constraint because it has Self or associated type requirements
Any ideas on how to do what I want
var set: Set<Hashable> = Set()
for annotation in self.annotations {
guard let hashable = annotation as? Hashable else { continue }
set.update(with: hashable)
}
So what i ended up with is this