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:
Johannes Weiss authored and GitHub committed 2018-12-17 17:13:25 +00:00
1 parent 2262b656ac
commit 885ac373ad
2 files changed
+2 -1

No files matched your search

+1 -1
View File
@@ -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