mirror of
https://github.com/apple/swift-nio-extras.git
synced 2025-05-15 01:18:58 +08:00
Fix Swift 5.0
This commit is contained in:
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
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user