1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-28 09:31:16 +02:00

Use TeeSink and TeeSouce in a few more places

This commit is contained in:
John Ericson 2020-08-13 14:47:53 +00:00
parent 859cd4acea
commit 85aacbee64
5 changed files with 20 additions and 21 deletions

View file

@ -366,11 +366,7 @@ void copyNAR(Source & source, Sink & sink)
ParseSink parseSink; /* null sink; just parse the NAR */
LambdaSource wrapper([&](unsigned char * data, size_t len) {
auto n = source.read(data, len);
sink(data, n);
return n;
});
TeeSource wrapper { source, sink };
parseDump(parseSink, wrapper);
}