ax(ueps): remove redundant err shadow in ReadAndVerify payload branch
The inner scope re-declared `var err error` immediately before assigning from `io.ReadAll`, unnecessarily shadowing the `err` already in scope from `reader.ReadByte()`. Removing the shadow simplifies the control flow and eliminates the redundant declaration (AX Principle 1 — names should not introduce unnecessary cognitive overhead). Co-Authored-By: Charon <charon@lethean.io>
This commit is contained in:
parent
22a74415f3
commit
0ab8c0fe7d
1 changed files with 0 additions and 1 deletions
|
|
@ -39,7 +39,6 @@ func ReadAndVerify(reader *bufio.Reader, sharedSecret []byte) (*ParsedPacket, er
|
|||
}
|
||||
|
||||
if tagByte == TagPayload {
|
||||
var err error
|
||||
payload, err = io.ReadAll(reader)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue