Skip to content

Commit

Permalink
upgrade dao (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
lxzan committed Jan 5, 2024
1 parent 7e7bd69 commit 19a6df4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.19
require (
github.com/dolthub/maphash v0.1.0
github.com/dolthub/swiss v0.2.1
github.com/lxzan/dao v1.1.2
github.com/lxzan/dao v1.1.6
github.com/stretchr/testify v1.8.4
)

Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORN
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/lxzan/dao v1.1.2 h1:ATYm6yBE117iQetDTmCZeHB4mBFjO43NbsEt7wf/JBo=
github.com/lxzan/dao v1.1.2/go.mod h1:5ChTIo7RSZ4upqRo16eicJ3XdJWhGwgMIsyuGLMUofM=
github.com/lxzan/dao v1.1.6 h1:tYhLpuooCZA2knmORoGE3pdGwckQjSEetNrq/mZCRgA=
github.com/lxzan/dao v1.1.6/go.mod h1:5ChTIo7RSZ4upqRo16eicJ3XdJWhGwgMIsyuGLMUofM=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
Expand Down
4 changes: 2 additions & 2 deletions heap.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package memorycache

import "github.com/lxzan/dao/algorithm"
import "github.com/lxzan/dao/algo"

// newHeap 新建一个堆
// Create a new heap
Expand Down Expand Up @@ -96,7 +96,7 @@ func (c *heap[K, V]) Down(i, n int) {
return
}

var end = algorithm.Min(base+4, n-1)
var end = algo.Min(base+4, n-1)
for j := base + 2; j <= end; j++ {
if c.Less(j, index) {
index = j
Expand Down

0 comments on commit 19a6df4

Please sign in to comment.