Skip to content

Commit

Permalink
decode: minor change to method receiver name
Browse files Browse the repository at this point in the history
  • Loading branch information
dgmcdona committed Dec 8, 2022
1 parent 04379df commit a162e07
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions format/applebookmark/apple_bookmark.go
Expand Up @@ -324,22 +324,22 @@ const (

type posLoopDetector []int64

func (p *posLoopDetector) push(i int64, fn func()) {
for _, v := range *p {
if i == v {
fn()
func (pld *posLoopDetector) push(i int64, detect func()) {
for _, o := range *pld {
if i == o {
detect()
}
}
*p = append(*p, i)
*pld = append(*pld, i)
}

func (p *posLoopDetector) pop() {
*p = (*p)[:len(*p)-1]
func (pld *posLoopDetector) pop() {
*pld = (*pld)[:len(*pld)-1]
}

func (p *posLoopDetector) pushAndPop(i int64, fn func()) func() {
p.push(i, fn)
return p.pop
func (pld *posLoopDetector) pushAndPop(i int64, detect func()) func() {
pld.push(i, detect)
return pld.pop
}

func makeDecodeRecord() func(d *decode.D) {
Expand Down

0 comments on commit a162e07

Please sign in to comment.