Quiz · Collections · lesson 4 of 10
Quiz — with_capacity
What does the program print?
fn main() {
let mut v = Vec::with_capacity(10);
v.push(1);
println!("{} {}", v.len(), v.capacity());
}What does the program print?
fn main() {
let mut v = Vec::with_capacity(10);
v.push(1);
println!("{} {}", v.len(), v.capacity());
}