1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-12 21:46:01 +01:00

Revert "LocalStore::addToStoreFromDump copy in chunks"

This reverts commit 592851fb67. We don't
need this extra feature anymore
This commit is contained in:
John Ericson 2020-07-15 23:19:41 +00:00
parent bc109648c4
commit 5602637d9e
3 changed files with 15 additions and 31 deletions

View file

@ -273,19 +273,10 @@ struct ChainSource : Source
/* Convert a function that feeds data into a Sink into a Source. The
Source executes the function as a coroutine. */
std::unique_ptr<Source> sinkToSource(
std::function<void(Sink &, size_t &)> fun,
std::function<void()> eof = []() {
throw EndOfFile("coroutine has finished");
});
static inline std::unique_ptr<Source> sinkToSource(
std::function<void(Sink &)> fun,
std::function<void()> eof = []() {
throw EndOfFile("coroutine has finished");
})
{
return sinkToSource([fun](Sink & s, size_t & _) { fun(s); }, eof);
}
});
void writePadding(size_t len, Sink & sink);