Skip to content

Commit 212bfd0

Browse files
matttaciidgh
authored andcommitted
Use synthesized conformance to Equatable
1 parent 177a763 commit 212bfd0

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

Sources/PlayingCard/PlayingCard.swift

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
See http://swift.org/CONTRIBUTORS.txt for Swift project authors
99
*/
1010

11-
public struct PlayingCard {
11+
public struct PlayingCard: Equatable {
1212
public let rank: Rank
1313
public let suit: Suit
1414

@@ -18,14 +18,6 @@ public struct PlayingCard {
1818
}
1919
}
2020

21-
// MARK: - Equatable
22-
23-
extension PlayingCard: Equatable {
24-
public static func ==(lhs: PlayingCard, rhs: PlayingCard) -> Bool {
25-
return lhs.rank == rhs.rank && lhs.suit == rhs.suit
26-
}
27-
}
28-
2921
// MARK: - Comparable
3022

3123
extension PlayingCard: Comparable {

0 commit comments

Comments
 (0)