Skip to content

Commit 788f16b

Browse files
committed
Add the test case from #105.
Closes #105.
1 parent f0c2df0 commit 788f16b

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Versioning](http://semver.org/spec/v2.0.0.html).
1818

1919
- Fixed a quadratic time worst case scenario in the quicksort implementation for
2020
`Vector`. (#101)
21-
- Fixed an edge case bug when splitting and joining large `Vector`s. (#107)
21+
- Fixed an edge case bug when splitting and joining large `Vector`s. (#105, #107)
2222

2323
## [13.0.0] - 2019-05-18
2424

src/vector/mod.rs

+13
Original file line numberDiff line numberDiff line change
@@ -2635,6 +2635,19 @@ mod test {
26352635
x.insert(514, 0);
26362636
}
26372637

2638+
#[test]
2639+
fn issue_105() {
2640+
let mut v = Vector::new();
2641+
2642+
for i in 0..270_000 {
2643+
v.push_front(i);
2644+
}
2645+
2646+
while !v.is_empty() {
2647+
v = v.take(v.len() - 1);
2648+
}
2649+
}
2650+
26382651
#[test]
26392652
fn issue_107_split_off_causes_overflow() {
26402653
let mut vec = Vector::from_iter(0..4289);

0 commit comments

Comments
 (0)