Skip to content

Commit

Permalink
Fix warning during compiling tests.
Browse files Browse the repository at this point in the history
Motivation:

When compiling the tests the following warning is printed:

swift-nio/Tests/NIOTests/SelectorTest.swift:361:43: warning: result of call to 'wait()' is unused
        }.wait().forEach { return try! $0.wait() } as Void)

Modifications:

Ignore return value to silent the compiler warnings.

Result:

No more warnings.
  • Loading branch information
normanmaurer committed Apr 25, 2018
1 parent 5599bfe commit b9598a6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Tests/NIOTests/SelectorTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ class SelectorTest: XCTestCase {
return channel
}
}
}.wait().forEach { return try! $0.wait() } as Void)
}.wait().forEach { _ = try! $0.wait() } as Void)
XCTAssertNoThrow(try everythingWasReadPromise.futureResult.wait())
XCTAssertNoThrow(try FileManager.default.removeItem(at: URL(fileURLWithPath: tempDir)))
}
Expand Down

0 comments on commit b9598a6

Please # to comment.