Skip to content

Commit 39ddabb

Browse files
matttaciidgh
authored andcommitted
Add conformance to CaseIterable
1 parent 3e73c3e commit 39ddabb

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Diff for: Sources/PlayingCard/Rank.swift

+1-1
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 enum Rank: Int {
11+
public enum Rank: Int, CaseIterable {
1212
case two = 2
1313
case three, four, five, six, seven, eight, nine, ten
1414
case jack, queen, king, ace

Diff for: Sources/PlayingCard/Suit.swift

+1-1
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 enum Suit: String {
11+
public enum Suit: String, CaseIterable {
1212
case spades, hearts, diamonds, clubs
1313
}
1414

0 commit comments

Comments
 (0)