Created
November 23, 2017 11:21
-
-
Save chriswill0w/b14142fb439772e0129863fd38089f5c to your computer and use it in GitHub Desktop.
This file contains 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
protocol CusotmEquatable { | |
func isEqual(to rhs: CusotmEquatable) -> Bool | |
} | |
extension CusotmEquatable where Self: Equatable { | |
func isEqual(to rhs: CusotmEquatable) -> Bool { | |
guard let rhs = rhs as? Self else { | |
return false | |
} | |
return self == rhs | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment