refactor: change func Length to Size in CircularQueue

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

No files matched your search

+2 -2
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
}