Skip to content
Prev Previous commit
Next Next commit
final clean up closes #6
  • Loading branch information
dkz2 committed Jun 30, 2023
commit 79b653f6a3a5fc367f1971c89e8930dfbba913a4
2 changes: 1 addition & 1 deletion Sources/SwiftMemcache/MemcachedResponseDecoder.swift
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ struct MemcachedResponseDecoder: NIOSingleStepByteToMessageDecoder {
case dataLength(MemcachedResponse.ReturnCode)
/// Decode the flags
case flags(MemcachedResponse.ReturnCode, UInt64?)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's rename this to decodeFlag and always try to decode a single flag at a time. We just have to update the flags struct and store it as a state here.

Suggested change
case flags(MemcachedResponse.ReturnCode, UInt64?)
case flags(MemcachedResponse.ReturnCode, UInt64?)
// TODO: Add a next step for decoding the response data if the return code is VA
/// Decode the Value
case decodeValue(MemcachedResponse.ReturnCode, UInt64, MemcachedFlags?)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need an optional for flags here we can just always have it since all its field are optional

}

Expand Down