Skip to content

Commit

Permalink
Fix bug with queue data structure
Browse files Browse the repository at this point in the history
  • Loading branch information
dancannon committed Apr 14, 2015
1 parent d968f8b commit aa61a59
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cursor.go
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,10 @@ type queue struct {
}

func (q *queue) Len() int {
if len(q.elems) == 0 {
return 0
}

return q.nelems
}
func (q *queue) Push(elem interface{}) {
Expand Down

0 comments on commit aa61a59

Please sign in to comment.