mirror of https://github.com/tidwall/tinyqueue.git
len function
This commit is contained in:
parent
fc4cef0a81
commit
1feaf062ef
|
@ -46,7 +46,9 @@ func (q *Queue) Peek() Item {
|
||||||
}
|
}
|
||||||
return q.data[0]
|
return q.data[0]
|
||||||
}
|
}
|
||||||
|
func (q *Queue) Len() int {
|
||||||
|
return q.length
|
||||||
|
}
|
||||||
func (q *Queue) down(pos int) {
|
func (q *Queue) down(pos int) {
|
||||||
data := q.data
|
data := q.data
|
||||||
halfLength := q.length >> 1
|
halfLength := q.length >> 1
|
||||||
|
|
Loading…
Reference in New Issue