"rust".to_string() or String::from("rust")

224 points awesomealchemy 135 comments

Are they functionally equivalent?

Which one is more idiomatic? Which one do you prefer?