Account for heap allocated capacities.

This commit is contained in:
mental
2020-01-19 04:57:34 +00:00
parent fc564bfc25
commit dd802b30fa
2 changed files with 12 additions and 2 deletions
+6
View File
@@ -21,6 +21,12 @@ fn TinyVec_swap_remove() {
assert_eq!(&tv[..], &[][..]);
}
#[test]
fn TinyVec_capacity() {
let tv: TinyVec<[i32; 10]> = Default::default();
assert_eq!(tv.capacity(), 10);
}
#[test]
fn TinyVec_drain() {
let mut tv: TinyVec<[i32; 10]> = Default::default();