1
0
mirror of https://github.com/duke-git/lancet.git synced 2026-02-08 06:32:28 +08:00

refactor: change func Length to Size in CircularQueue

This commit is contained in:
dudaodong
2022-06-05 16:57:03 +08:00
parent 747dc30b02
commit 61251fb0f1
2 changed files with 7 additions and 7 deletions

View File

@@ -37,8 +37,8 @@ func (q *CircularQueue[T]) Data() []T {
return data
}
// Length return current data length of queue
func (q *CircularQueue[T]) Length() int {
// Size return number of elements in circular queue
func (q *CircularQueue[T]) Size() int {
if q.capacity == 0 {
return 0
}