mirror of
https://github.com/duke-git/lancet.git
synced 2025-10-05 15:36:52 +08:00
update func DeQueue comment
This commit is contained in:
@@ -52,7 +52,7 @@ func (q *ArrayQueue[T]) EnQueue(value T) {
|
||||
q.length++
|
||||
}
|
||||
|
||||
// DeQueue get the head element of queue, if queue is empty, return nil and error
|
||||
// DeQueue remove head element of queue and return it, if queue is empty, return nil and error
|
||||
func (q *ArrayQueue[T]) DeQueue() (*T, error) {
|
||||
if q.IsEmpty() {
|
||||
return nil, errors.New("queue is empty")
|
||||
|
Reference in New Issue
Block a user