mirror of
https://github.com/apple/swift-nio-extras.git
synced 2025-05-15 09:22:38 +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? {
|
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 {
|
guard let version = buffer.readInteger(as: UInt8.self) else {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
@ -43,7 +43,7 @@ extension ByteBuffer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
mutating func readAndValidateReserved() throws -> UInt8? {
|
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 {
|
guard let reserved = buffer.readInteger(as: UInt8.self) else {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user