Below is some code that fills a vector with String
entries. I'm using it to test a function I'm trying to convert over to using generics. Anyway, even though it works, it just seems clumsy to me. There has to be a better, more flexible way to fill a vector with String
entries? Thoughts?
fn main() {
let mut santa: Vec<String> = Vec::new();
santa.push("Trees".to_string());
santa.push("Posts".to_string());
santa.push("Staples".to_string());
santa.push("Cows".to_string());
santa.push("Bulls".to_string());
println!("\n In main() the vector vector is:\n {:?}", santa);
}