diff --git a/src/deque.jl b/src/deque.jl index 1ba54c13..d4bd0283 100644 --- a/src/deque.jl +++ b/src/deque.jl @@ -297,6 +297,7 @@ function Base.pop!(d::Deque{T}) where T @assert rear.back >= rear.front @inbounds x = rear.data[rear.back] + Base._unsetindex!(rear.data, rear.back) rear.back -= 1 if rear.back < rear.front if d.nblocks > 1 @@ -322,6 +323,7 @@ function Base.popfirst!(d::Deque{T}) where T @assert head.back >= head.front @inbounds x = head.data[head.front] + Base._unsetindex!(head.data, head.front) head.front += 1 if head.back < head.front if d.nblocks > 1