mirror of
https://github.com/NixOS/nix.git
synced 2025-11-20 09:19:36 +01:00
Remove addToStore variant as requested by FIXME
The idea is it's always more flexible to consumer a `Source` than a plain string, and it might even reduce memory consumption. I also looked at `addToStoreFromDump` with its `// FIXME: remove?`, but the worked needed for that is far more up for interpretation, so I punted for now.
This commit is contained in:
parent
f60ce4fa20
commit
fac0c2d54a
7 changed files with 20 additions and 29 deletions
|
|
@ -71,7 +71,8 @@ DownloadFileResult downloadFile(
|
|||
info.narHash = hashString(htSHA256, *sink.s);
|
||||
info.narSize = sink.s->size();
|
||||
info.ca = makeFixedOutputCA(FileIngestionMethod::Flat, hash);
|
||||
store->addToStore(info, sink.s, NoRepair, NoCheckSigs);
|
||||
auto source = StringSource { *sink.s };
|
||||
store->addToStore(info, source, NoRepair, NoCheckSigs);
|
||||
storePath = std::move(info.path);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue