Hi,
I want to create a vec of Strings. Then just wait for the user input tot fill the vec.
fn main() {
let stdin = io::stdin();
let mut new_list: Vec<String> = Vec::new();
for line in stdin.lock().lines() {
let mut newInput = line.unwrap();
println!("{}", newInput);
new_list.append(newInput);
}
}
The error I get from this is expected &mut Vec<String>
, found struct String
on the append line.
How can I fix this?