Skip to content

Commit 8b23060

Browse files
authored
Kill build warnings. (#283)
Motivation: Build warnings fail our builds. Modifications: - Update minimum NIOSSL version - Remove the use of the now-unnecessary `try` statement. Result: No warnings!
1 parent 643a0dc commit 8b23060

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Diff for: Package.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ let package = Package(
2222
],
2323
dependencies: [
2424
.package(url: "https://github.com/apple/swift-nio.git", from: "2.18.0"),
25-
.package(url: "https://github.com/apple/swift-nio-ssl.git", from: "2.7.0"),
25+
.package(url: "https://github.com/apple/swift-nio-ssl.git", from: "2.8.0"),
2626
.package(url: "https://github.com/apple/swift-nio-extras.git", from: "1.3.0"),
2727
.package(url: "https://github.com/apple/swift-nio-transport-services.git", from: "1.5.1"),
2828
.package(url: "https://github.com/apple/swift-log.git", from: "1.0.0"),

Diff for: Tests/AsyncHTTPClientTests/HTTPClientTestUtils.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ internal final class HTTPBin {
212212
let configuration = TLSConfiguration.forServer(certificateChain: [.certificate(try! NIOSSLCertificate(bytes: Array(cert.utf8), format: .pem))],
213213
privateKey: .privateKey(try! NIOSSLPrivateKey(bytes: Array(key.utf8), format: .pem)))
214214
let context = try! NIOSSLContext(configuration: configuration)
215-
return channel.pipeline.addHandler(try! NIOSSLServerHandler(context: context), position: .first)
215+
return channel.pipeline.addHandler(NIOSSLServerHandler(context: context), position: .first)
216216
}
217217

218218
init(ssl: Bool = false,
@@ -655,7 +655,7 @@ internal class HttpBinForSSLUncleanShutdown {
655655
let configuration = TLSConfiguration.forServer(certificateChain: [.certificate(try! NIOSSLCertificate(bytes: Array(cert.utf8), format: .pem))],
656656
privateKey: .privateKey(try! NIOSSLPrivateKey(bytes: Array(key.utf8), format: .pem)))
657657
let context = try! NIOSSLContext(configuration: configuration)
658-
return channel.pipeline.addHandler(try! NIOSSLServerHandler(context: context), name: "NIOSSLServerHandler", position: .first).flatMap {
658+
return channel.pipeline.addHandler(NIOSSLServerHandler(context: context), name: "NIOSSLServerHandler", position: .first).flatMap {
659659
channel.pipeline.addHandler(HttpBinForSSLUncleanShutdownHandler(channelPromise: channelPromise))
660660
}
661661
}

0 commit comments

Comments
 (0)