Pre-allocate memory in extend_from_slice, extend and append functions (#80)

* change behavior on extend_from_slice, append

* preallocation in extend()

* append v2

* obviously

* fix resize_with
This commit is contained in:
Soveu
2020-07-17 18:21:06 +02:00
committed by GitHub
parent 1a2ed23590
commit 66077cfa99
2 changed files with 55 additions and 20 deletions
+1
View File
@@ -99,3 +99,4 @@ fn TinyVec_macro_non_copy() {
let s = String::new();
let _: TinyVec<[String; 10]> = tiny_vec!([String; 10] => s);
}