Yup! Yeah, it really depends on your style. Rust tends to prefer methods to free functions, due to multi-dispatch, but there's a good argument for either style.
Furthermore, there's a non-generic version of this particular conversion:
"foo".to_string()
And, a generic version that expresses a different semantic:
"foo".to_owned()
Strings are a very common type, and so implement a _lot_ of these things, even when this kind of usecase may overlap.
Well, one reason is that to_string() is ancient, but into() is fairly new. Another is that 'to' and 'into' are two different things: to_string() takes its caller by reference, and produces a copy. into() takes its caller by value, and so consumes it.
Furthermore, there's a non-generic version of this particular conversion:
And, a generic version that expresses a different semantic: Strings are a very common type, and so implement a _lot_ of these things, even when this kind of usecase may overlap.