mirror of
https://github.com/NixOS/nix
synced 2025-07-06 21:41:48 +02:00
Eliminate some large string copying
This commit is contained in:
parent
ce113c32d2
commit
42bc395b63
5 changed files with 25 additions and 23 deletions
|
@ -2009,7 +2009,7 @@ void DerivationGoal::startBuilder()
|
|||
throw SysError(format("linking ‘%1%’ to ‘%2%’") % p % i);
|
||||
StringSink sink;
|
||||
dumpPath(i, sink);
|
||||
StringSource source(sink.s);
|
||||
StringSource source(*sink.s);
|
||||
restorePath(p, source);
|
||||
}
|
||||
}
|
||||
|
@ -2666,8 +2666,8 @@ void DerivationGoal::registerOutputs()
|
|||
StringSink sink;
|
||||
dumpPath(actualPath, sink);
|
||||
deletePath(actualPath);
|
||||
sink.s = rewriteHashes(sink.s, rewritesFromTmp);
|
||||
StringSource source(sink.s);
|
||||
sink.s = make_ref<std::string>(rewriteHashes(*sink.s, rewritesFromTmp));
|
||||
StringSource source(*sink.s);
|
||||
restorePath(actualPath, source);
|
||||
|
||||
rewritten = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue