mirror of
https://github.com/apple/swift-nio
synced 2026-11-30 05:28:44 +00:00
fix remaining warnings & -warnings-as-errors (#712)
Motivation: Warnings are bad. Modifications: - fixed remaining warnings - enabled -warnings-as-errors Result: happier devs
This commit is contained in:
1 parent
2262b656ac
commit
885ac373ad
2 files changed
+2
-1
No files matched your search
@@ -24,7 +24,7 @@ final class LineDelimiterCodec: ByteToMessageDecoder {
|
||||
public var cumulationBuffer: ByteBuffer?
|
||||
|
||||
public func decode(ctx: ChannelHandlerContext, buffer: inout ByteBuffer) throws -> DecodingState {
|
||||
let readable = buffer.withUnsafeReadableBytes { $0.index(of: newLine) }
|
||||
let readable = buffer.withUnsafeReadableBytes { $0.firstIndex(of: newLine) }
|
||||
if let r = readable {
|
||||
ctx.fireChannelRead(self.wrapInboundOut(buffer.readSlice(length: r + 1)!))
|
||||
return .continue
|
||||
|
||||
Reference in new issue
Block a user