From 61e0e125f343eb07b29029290ad4105ad7ff6bdc Mon Sep 17 00:00:00 2001 From: Rose Hogenson Date: Fri, 11 Apr 2025 16:52:54 -0700 Subject: Get rid of AvailableBuffer It's probably fine, but I don't want to commit to it before v1. --- deque.go | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'deque.go') diff --git a/deque.go b/deque.go index d4ef4be..3afb8a8 100644 --- a/deque.go +++ b/deque.go @@ -106,17 +106,6 @@ func (q *Deque[T]) Reset() { q.buf = q.buf[:0] } -// AvailableBuffer returns an empty slice with q.Cap()-q.Len() capacity. This -// slice is intended to be appended to and passed to an immediately succeeding -// Deque.PushBack call. The slice is only valid until the next push operation on q. -func (q *Deque[T]) AvailableBuffer() []T { - endIdx := q.toPhysicalIdx(len(q.buf)) - if endIdx <= q.head { - return q.buf[endIdx:endIdx:q.head] - } - return q.buf[endIdx:endIdx] -} - // Grow makes space for at least n more elements to be inserted in the given // deque without reallocation. func (q *Deque[T]) Grow(n int) { -- cgit v1.3.1