miniblog.
← Back to all posts
Wilfred Hughes
Mar 23, 2022 at 07:03
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?