to_string() vs to_owned #
to_string
use formatting framework in the past, but it’s specialized now. So use it now!to_owned
simpler internal allocation
- https://users.rust-lang.org/t/to-string-vs-to-owned-for-string-literals/1441/3
- https://medium.com/@ericdreichert/converting-str-to-string-vs-to-owned-with-two-benchmarks-a66fd5a081ce#:~:text=to_string()%20is%20the%20generic,the%20literal%20into%20the%20buffer.
- https://www.youtube.com/watch?v=3iC3FVS6UXQ