mirror of
https://github.com/zhigang1992/SwiftParsec.git
synced 2026-04-29 01:35:56 +08:00
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:
@@ -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 {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user