1
0
mirror of https://github.com/apple/swift-nio-extras.git synced 2025-05-18 19:22:42 +08:00

Fix Swift 5.0

This commit is contained in:
David Evans 2021-06-10 11:18:17 +01:00
parent f769bf4fe1
commit d3a512c397

@ -31,7 +31,7 @@ extension ByteBuffer {
}
mutating func readAndValidateProtocolVersion() throws -> UInt8? {
try self.parseUnwindingIfNeeded { buffer in
try self.parseUnwindingIfNeeded { buffer -> UInt8? in
guard let version = buffer.readInteger(as: UInt8.self) else {
return nil
}
@ -43,7 +43,7 @@ extension ByteBuffer {
}
mutating func readAndValidateReserved() throws -> UInt8? {
try self.parseUnwindingIfNeeded { buffer in
try self.parseUnwindingIfNeeded { buffer -> UInt8? in
guard let reserved = buffer.readInteger(as: UInt8.self) else {
return nil
}