mirror of
https://github.com/NixOS/nix.git
synced 2025-12-23 17:31:08 +01:00
Merge pull request #14835 from Zaczero/zaczero/reserve-perf
Fix reserve pitfall in printString
This commit is contained in:
commit
f1f99b6598
1 changed files with 0 additions and 1 deletions
|
|
@ -523,7 +523,6 @@ Derivation parseDerivation(
|
|||
*/
|
||||
static void printString(std::string & res, std::string_view s)
|
||||
{
|
||||
res.reserve(res.size() + s.size() * 2 + 2);
|
||||
res += '"';
|
||||
static constexpr auto chunkSize = 1024;
|
||||
std::array<char, 2 * chunkSize + 2> buffer;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue