mirror of
https://github.com/NixOS/nix.git
synced 2024-11-22 14:52:55 +00:00
Avoid unnecessary copy of goal log
The data was (accidentally?) copied into a std::string, even though the string is immediately converted into a std::string_view. The code has been changed to construct a std::string_view directly, such that one copy less happens.
This commit is contained in:
parent
cbd5553d57
commit
f61d951909
@ -449,7 +449,7 @@ void Worker::waitForInput()
|
||||
} else {
|
||||
printMsg(lvlVomit, "%1%: read %2% bytes",
|
||||
goal->getName(), rd);
|
||||
std::string data((char *) buffer.data(), rd);
|
||||
std::string_view data((char *) buffer.data(), rd);
|
||||
j->lastOutput = after;
|
||||
goal->handleChildOutput(k, data);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user