Skip to content

Instantly share code, notes, and snippets.

@iosdevie
Created May 29, 2021 19:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iosdevie/fd8afb1880910ea12f3dc7b9f9da10b1 to your computer and use it in GitHub Desktop.
Save iosdevie/fd8afb1880910ea12f3dc7b9f9da10b1 to your computer and use it in GitHub Desktop.
struct Movies: Hashable {
let identifier: UUID = UUID()
let name: String
func hash(into hasher: inout Hasher) {
return hasher.combine(identifier)
}
static func == (lhs: Movies, rhs: Movies) -> Bool {
return lhs.identifier == rhs.identifier
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment