Rust has a ton of ways you can convert a &str to a String: .into(), .to_string(), .to_owned(). I'm never sure which one reads best. Maybe .to_owned() shows your intention the most clearly?