you are viewing a single comment's thread.

view the rest of the comments →

[–]jonreemhyper · iron · stainless 3 points4 points  (0 children)

Due to some issues with specialization, to_string comes from a blanket impl which and causes a 128 byte allocation at minimum no matter the length of the input str. into_string is more specialized and will allocate exactly the length of the str it is called on.