Skip to content

Commit 84311bb

Browse files
author
Harlan Haskins
authored
Remove error-conforming string from Participant
1 parent bf8c1a9 commit 84311bb

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

Sources/Exercises/Participant.swift

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,20 +31,22 @@ public protocol Participant {
3131

3232
// Default impls
3333
extension Participant {
34-
static var unsupported: Error { "Unsupported" }
34+
enum Error: Swift.Error {
35+
case unsupported
36+
}
3537

3638
// Produce a function that will parse a grapheme break entry from a line
3739
public static func graphemeBreakProperty() throws -> (String) -> GraphemeBreakEntry? {
38-
throw unsupported
40+
throw Error.unsupported
3941
}
4042

4143
// Produce a function that will extract the bodies of C-style comments from its input
4244
public static func cComments() throws -> (String) -> [Substring] {
43-
throw unsupported
45+
throw Error.unsupported
4446
}
4547

4648
// Produce a function that will extract the bodies of Swift-style comments from its input
4749
public static func swiftComments() throws -> (String) -> [Substring] {
48-
throw unsupported
50+
throw Error.unsupported
4951
}
5052
}

0 commit comments

Comments
 (0)