Skip to content

Commit

Permalink
doc fix
Browse files Browse the repository at this point in the history
  • Loading branch information
markekraus committed Mar 18, 2022
1 parent d44fd48 commit 04ca854
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/genq.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,15 @@ func (q *Queue[T]) Dequeue() *Message[T] {
// The complexity is O(1).
func (q *Queue[T]) Len() int { return q.len }

// Init initializes or clears list l.
// Init initializes or clears queue q.
func (q *Queue[T]) Init() *Queue[T] {
q.root.next = &q.root
q.root.prev = &q.root
q.len = 0
return q
}

// New returns an initialized list.
// New returns an initialized queue.
func New[T any]() *Queue[T] {
return new(Queue[T]).Init()
}

0 comments on commit 04ca854

Please sign in to comment.