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:
parent
859cd4acea
commit
85aacbee64
5 changed files with 20 additions and 21 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue