]> git.proxmox.com Git - cargo.git/commit
Auto merge of #8641 - weihanglo:fix/remove-alloc, r=Eh2406
authorbors <bors@rust-lang.org>
Sun, 23 Aug 2020 13:07:55 +0000 (13:07 +0000)
committerbors <bors@rust-lang.org>
Sun, 23 Aug 2020 13:07:55 +0000 (13:07 +0000)
commit5165270dd4ff92deab0af23ca9ee317714d2e045
tree3d6b099db257430b18a425980c0b73700d55369f
parent868a1cf00a02cf29b75338dd283acb6acbddea4f
parent0c70319afe062b5e7f3ae1d2c03c17c970d3dceb
Auto merge of #8641 - weihanglo:fix/remove-alloc, r=Eh2406

fix: remove unnecessary allocations

Remove unnecessary `str::to_string` and `str::replace` allocations by using iterators. This PR is almost identical to #8622 except it does not skip the generated header.

Sorry that I did not profile the changes by myself. Seems that valgrind does not support macOS 10.15.6, I have not idea how to profile cargo subcommand. It would be great for an instruction to run a memory profiling for Rust program on macOS.