aboutsummaryrefslogtreecommitdiff
path: root/src/libutil/archive.cc
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2020-08-13 14:47:53 +0000
committerJohn Ericson <John.Ericson@Obsidian.Systems>2020-08-13 14:51:17 +0000
commit85aacbee64680e60b22e8a729756b0a3882f8b8f (patch)
tree10388e457650366ed00a3c7f1763d10227ac40f9 /src/libutil/archive.cc
parent859cd4acea8feadcc0b080ec1a75891e6277339c (diff)
Use `TeeSink` and `TeeSouce` in a few more places
Diffstat (limited to 'src/libutil/archive.cc')
-rw-r--r--src/libutil/archive.cc6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/libutil/archive.cc b/src/libutil/archive.cc
index ce7cf9754..14399dea3 100644
--- a/src/libutil/archive.cc
+++ b/src/libutil/archive.cc
@@ -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);
}