Skip to content

Commit d9a438d

Browse files
committed
Add another assertion without into_iter
1 parent 4b53f56 commit d9a438d

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

library/alloc/tests/vec.rs

+6-2
Original file line numberDiff line numberDiff line change
@@ -1009,10 +1009,14 @@ fn test_into_iter_drop_allocator() {
10091009
}
10101010

10111011
let mut drop_count = 0;
1012-
let allocator = ReferenceCountedAllocator(DropCounter { count: &mut drop_count });
1013-
let _ = Vec::<u32, _>::new_in(allocator).into_iter();
10141012

1013+
let allocator = ReferenceCountedAllocator(DropCounter { count: &mut drop_count });
1014+
let _ = Vec::<u32, _>::new_in(allocator);
10151015
assert_eq!(drop_count, 1);
1016+
1017+
let allocator = ReferenceCountedAllocator(DropCounter { count: &mut drop_count });
1018+
let _ = Vec::<u32, _>::new_in(allocator).into_iter();
1019+
assert_eq!(drop_count, 2);
10161020
}
10171021

10181022
#[test]

0 commit comments

Comments
 (0)