How to declare a variable but not assign it?
I want to declare acceptable_set and use it. But an empty vector is assigned to it. So the compiler warns. How to declare a variable and do not assign it? let mut acceptable_set: Vec<String> = Vec::new(); if opt.acceptable_set.is_none() { acceptable_set = crate::builtin_words::ACCEPTABLE .to_vec() .iter_mut() .map(|x| x.to_string()) .collect(); } else { acceptable_set = get_acceptable_set(opt) } warning:… Read More How to declare a variable but not assign it?