error[E0597]: borrowed value does not live long enough in While loop
问题 I am really new to Rust, I am having trouble solving this error, but it only happens if I comment out the while statement , basicly I am asking values from the console and storing it in a HashMap: use std::collections::HashMap; use std::io; fn main() { let mut customers = HashMap::new(); let mut next_customer = true; while next_customer { let mut input_string = String::new(); let mut temp_vec = Vec::with_capacity(3); let mut vec = Vec::with_capacity(2); println!("Insert new customer f.e =