@@ -2795,7 +2795,7 @@ mod tests {
2795
2795
// 0, 1, 2, .., len - 1
2796
2796
let expected = ( 0 ..) . take ( len) . collect :: < VecDeque < _ > > ( ) ;
2797
2797
for tail_pos in 0 ..cap {
2798
- for to_remove in 0 ..len + 1 {
2798
+ for to_remove in 0 ..= len {
2799
2799
tester. tail = tail_pos;
2800
2800
tester. head = tail_pos;
2801
2801
for i in 0 ..len {
@@ -2821,10 +2821,10 @@ mod tests {
2821
2821
let mut tester: VecDeque < usize > = VecDeque :: with_capacity ( 7 ) ;
2822
2822
2823
2823
let cap = tester. capacity ( ) ;
2824
- for len in 0 ..cap + 1 {
2825
- for tail in 0 ..cap + 1 {
2826
- for drain_start in 0 ..len + 1 {
2827
- for drain_end in drain_start..len + 1 {
2824
+ for len in 0 ..= cap {
2825
+ for tail in 0 ..= cap {
2826
+ for drain_start in 0 ..= len {
2827
+ for drain_end in drain_start..= len {
2828
2828
tester. tail = tail;
2829
2829
tester. head = tail;
2830
2830
for i in 0 ..len {
@@ -2866,10 +2866,10 @@ mod tests {
2866
2866
tester. reserve ( 63 ) ;
2867
2867
let max_cap = tester. capacity ( ) ;
2868
2868
2869
- for len in 0 ..cap + 1 {
2869
+ for len in 0 ..= cap {
2870
2870
// 0, 1, 2, .., len - 1
2871
2871
let expected = ( 0 ..) . take ( len) . collect :: < VecDeque < _ > > ( ) ;
2872
- for tail_pos in 0 ..max_cap + 1 {
2872
+ for tail_pos in 0 ..= max_cap {
2873
2873
tester. tail = tail_pos;
2874
2874
tester. head = tail_pos;
2875
2875
tester. reserve ( 63 ) ;
@@ -2899,7 +2899,7 @@ mod tests {
2899
2899
// len is the length *before* splitting
2900
2900
for len in 0 ..cap {
2901
2901
// index to split at
2902
- for at in 0 ..len + 1 {
2902
+ for at in 0 ..= len {
2903
2903
// 0, 1, 2, .., at - 1 (may be empty)
2904
2904
let expected_self = ( 0 ..) . take ( at) . collect :: < VecDeque < _ > > ( ) ;
2905
2905
// at, at + 1, .., len - 1 (may be empty)
@@ -2927,7 +2927,7 @@ mod tests {
2927
2927
fn test_from_vec ( ) {
2928
2928
use vec:: Vec ;
2929
2929
for cap in 0 ..35 {
2930
- for len in 0 ..cap + 1 {
2930
+ for len in 0 ..= cap {
2931
2931
let mut vec = Vec :: with_capacity ( cap) ;
2932
2932
vec. extend ( 0 ..len) ;
2933
2933
0 commit comments