deque: Fix grow condition in add_front
Without this, it will hit the assert in fn grow after 32 consecutive add_front.
This commit is contained in:
parent
58eb70a5e2
commit
5a37cf8a31
1 changed files with 1 additions and 1 deletions
|
|
@ -107,7 +107,7 @@ impl<T> Deque<T> {
|
|||
if self.lo == 0u {
|
||||
self.lo = self.elts.len() - 1u;
|
||||
} else { self.lo -= 1u; }
|
||||
if self.lo == self.hi {
|
||||
if self.nelts == self.elts.len() {
|
||||
self.elts = grow(self.nelts, oldlo, self.elts);
|
||||
self.lo = self.elts.len() - 1u;
|
||||
self.hi = self.nelts;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue