rust-lang/rust — pull request #19708 by japaric (2014-12-10 18:29:51+00:00)
Title: Use `into_string()` instead of `to_string()` on string literals

The `to_string()` method goes through the formatting machinery and tends to over-allocate memory (always `2^N` bytes). On the other hand `into_string()` does a memcpy and doesn't over-allocate. I don't see any reason to use the former if we can use the latter.

r? @alexcrichton