Move 'where' clause next to generic parameters

Compiler warning: 'where' clause next to generic parameters is
deprecated and will be removed in the future version of Swift.
This commit is contained in:
David Dufresne
2016-08-25 07:44:31 -04:00
parent 72d2f93985
commit 80857bc01a
5 changed files with 12 additions and 18 deletions

View File

@@ -14,11 +14,10 @@ extension XCTestCase {
/// Run `parser` in a `do-catch` block on the supplied input strings. The
/// assertions are performed in the `assert` function. If an error is thrown
/// it is reported with `XCTFail()`.
func testStringParserSuccess<Result, Input: Collection
where Input.Iterator.Element == String>(
func testStringParserSuccess<Result, Input: Collection>(
_ parser: GenericParser<String, (), Result>,
inputs: Input, assert: (String, Result) -> Void
) {
) where Input.Iterator.Element == String {
do {
@@ -56,12 +55,11 @@ extension XCTestCase {
/// Run `parser` in a `do-catch` block on the supplied input strings. The
/// assertions are performed in the `assert` function. If an error is thrown
/// it is reported with `XCTFail()`.
func testStringParserFailure<Result, Input: Collection
where Input.Iterator.Element == String>(
func testStringParserFailure<Result, Input: Collection>(
_ parser: GenericParser<String, (), Result>,
inputs: Input,
assert: (String, Result) -> Void
) {
) where Input.Iterator.Element == String {
for input in inputs {