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:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user