Beginning Collection Views · Configuring the Data | raywenderlich.com


This is a companion discussion topic for the original entry at https://www.raywenderlich.com/5429927-beginning-collection-views/lessons/22

why not use lhs.identifier == rhs.identifier in the == function

I found this when I jump into the definition of Hashable in xcode
/// Implement this method to conform to the Hashable protocol. The
/// components used for hashing must be the same as the components compared
/// in your type’s == operator implementation.

1 Like

@pasanpr Can you please help with this when you get a chance? Thank you - much appreciated! :]

What you’re suggesting is the correct implementation :smile:. I think I added the identifier property after defining the Hashable implementation