Skip to content

Commit

Permalink
Remove named return values
Browse files Browse the repository at this point in the history
Removes the named return values from replay detector implementations as
they are not currently being used and could lead to erroneous assignment
in the future.

Signed-off-by: Daniel Mangum <[email protected]>
  • Loading branch information
hasheddan committed Aug 2, 2023
1 parent 3cefa92 commit f2dffd8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions replaydetector/replaydetector.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func New(windowSize uint, maxSeq uint64) ReplayDetector {
}
}

func (d *slidingWindowDetector) Check(seq uint64) (accept func() bool, ok bool) {
func (d *slidingWindowDetector) Check(seq uint64) (func() bool, bool) {
if seq > d.maxSeq {
// Exceeded upper limit.
return nop, false
Expand Down Expand Up @@ -85,7 +85,7 @@ type wrappedSlidingWindowDetector struct {
init bool
}

func (d *wrappedSlidingWindowDetector) Check(seq uint64) (accept func() bool, ok bool) {
func (d *wrappedSlidingWindowDetector) Check(seq uint64) (func() bool, bool) {
if seq > d.maxSeq {
// Exceeded upper limit.
return nop, false
Expand Down

0 comments on commit f2dffd8

Please sign in to comment.