Created
November 12, 2020 19:16
-
-
Save nashysolutions/f67c08e42a08d29b4d99982939c3e8a2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension MenuItem: Hashable, Comparable { | |
func hash(into hasher: inout Hasher) { | |
hasher.combine(name) | |
} | |
} | |
extension MenuItem: Comparable { | |
static func <(lhs: MenuItem, rhs: MenuItem) -> Bool { | |
return lhs.name < rhs.name | |
} | |
static func ==(lhs: MenuItem, rhs: MenuItem) -> Bool { | |
return lhs.name == rhs.name | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment