Skip to content

Commit 6dc9f8a

Browse files
Koustav ChowdhuryKoustav Chowdhury
authored andcommitted
Use resize! instead of allocating undef in block head
1 parent eaea160 commit 6dc9f8a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/deque.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ isrear(blk::DequeBlock) = blk.next === blk
3939

4040
function reset!(blk::DequeBlock{T}, front::Int) where T
4141
empty!(blk.data)
42-
blk.data = Vector{T}(undef, blk.capa)
42+
resize!(blk.data, blk.capa)
4343
blk.front = front
4444
blk.back = front - 1
4545
blk.prev = blk

0 commit comments

Comments
 (0)