Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
DaviRain-Su authored Jul 21, 2023
2 parents cb0ee6c + daa1760 commit fa7d710
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions go/compress.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,17 +93,16 @@ func compressStep(step *InnerOp, lookup *[]*InnerOp, registry map[string]int32)
if err != nil {
panic(err)
}
sig := string(bz)

// load from cache if there
if num, ok := registry[sig]; ok {
if num, ok := registry[string(bz)]; ok {
return num
}

// create new step if not there
num := int32(len(*lookup))
*lookup = append(*lookup, step)
registry[sig] = num
registry[string(bz)] = num
return num
}

Expand Down

0 comments on commit fa7d710

Please sign in to comment.