Why I write this code correct? struct Module { name: String, messages: Vec<String>, } impl Module { fn new(name: String) -> Module { Module { name: name, messages: Vec::new(), } } fn print(&mut self) { match self.messages.get(0) { Some(msg) => {} None => { self.messages.push("empty list".to_string()); } } let messages = self.messages.join("\n"); println!("Module {}\n{}", self.name, messages); } }