Creating a vector with an initial size

As with a String, it is possible to create a vector with an initial allocation of memory, as follows:

let mut my_ids: Vec<i64> = Vec::with_capacity(30); 
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset