mirror of
https://github.com/apple/swift-nio
synced 2026-11-26 04:57:49 +00:00
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:
1 parent
695afc5205
commit
db586d552f
2 files changed
+2
-2
No files matched your search
@@ -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() {
|
||||
|
||||
@@ -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() {
|
||||
|
||||
Reference in new issue
Block a user