Allows referring to already initialized elements in a Vec<T> and similar data-types while pushing more elements into its reserved capacity.
// Create a vec with 3 elements.
let mut vec = vec!;
// Reserve room for 3 more elements and split the vec into initialized and spare parts.
let = vec.reserve_split_spare;
assert_eq!;
// Add the initial vec length to the initial elements, and push those new elements into the reserved space.
spare.extend;
assert_eq!;
Without this library, you can't use Extend because it mutably borrows the Vec<T> that you need to read items out of (index).
You would have to write something like:
let mut vec = vec!;
let init_len = vec.len;
vec.reserve;
for i in 0..init_len
assert_eq!;