Skip to content

Commit a0b7f64

Browse files
0xTimLukasa
authored andcommitted
Fixes build issue on 4.1 (#229)
Motivation: Resolves #228 Modifications: Remove type information in empty closure fixed build warning with compiler suggestion Result: No API changes, no issues building on 4.1!
1 parent 1bcf85d commit a0b7f64

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Sources/NIO/System.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ private let sysFreeifaddrs: @convention(c) (UnsafeMutablePointer<ifaddrs>?) -> V
5757
private let sysAF_INET = AF_INET
5858
private let sysAF_INET6 = AF_INET6
5959
private let sysAF_UNIX = AF_UNIX
60-
private let sysInet_ntop: @convention(c) (CInt, UnsafeRawPointer?, UnsafeMutablePointer<CChar>?, socklen_t) -> UnsafePointer<CChar>! = inet_ntop
60+
private let sysInet_ntop: @convention(c) (CInt, UnsafeRawPointer?, UnsafeMutablePointer<CChar>?, socklen_t) -> UnsafePointer<CChar>? = inet_ntop
6161

6262
#if os(Linux)
6363
private let sysSendMmsg: @convention(c) (CInt, UnsafeMutablePointer<CNIOLinux_mmsghdr>?, CUnsignedInt, CInt) -> CInt = CNIOLinux_sendmmsg

Sources/NIOWebSocketServer/main.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ private final class WebSocketTimeHandler: ChannelInboundHandler {
145145
buffer.write(string: "\(theTime)")
146146

147147
let frame = WebSocketFrame(fin: true, opcode: .text, data: buffer)
148-
ctx.writeAndFlush(self.wrapOutboundOut(frame)).map { (_: Void) in
148+
ctx.writeAndFlush(self.wrapOutboundOut(frame)).map {
149149
_ = ctx.eventLoop.scheduleTask(in: .seconds(1), { self.sendTime(ctx: ctx) })
150150
}.whenFailure { (_: Error) in
151151
ctx.close(promise: nil)

0 commit comments

Comments
 (0)