silence warning (#456)

Motivation:

Swift has a rather unhelpful warning

    warning: treating a forced downcast to 'EmbeddedEventLoop' as optional will never produce 'nil'

when assigning that to a variable of type `EmbeddedEventLoop!`. The
warning is accurate but obviously we know that can never be `nil`. The
way to silence this warning is to put parenthesis around the expression.

Modifications:

added parenthesis around force casts that are assigned to IUOs

Result:

fewer warnings with 4.2
This commit is contained in:
Johannes Weiss 2018-06-01 18:11:36 +01:00 committed by Cory Benfield
parent 695afc5205
commit db586d552f
2 changed files with 2 additions and 2 deletions

View File

@ -55,7 +55,7 @@ class HTTPDecoderLengthTest: XCTestCase {
override func setUp() {
self.channel = EmbeddedChannel()
self.loop = channel.eventLoop as! EmbeddedEventLoop
self.loop = (channel.eventLoop as! EmbeddedEventLoop)
}
override func tearDown() {

View File

@ -23,7 +23,7 @@ class HTTPDecoderTest: XCTestCase {
override func setUp() {
self.channel = EmbeddedChannel()
self.loop = channel.eventLoop as! EmbeddedEventLoop
self.loop = (channel.eventLoop as! EmbeddedEventLoop)
}
override func tearDown() {