From 34a856c7abc96f49a58cf0e86bab4b7d8a4cc7e6 Mon Sep 17 00:00:00 2001 From: Orivej Desh Date: Sat, 26 Dec 2020 11:23:26 +0000 Subject: [PATCH] Update for receiveContents taking string_view nix change: https://github.com/NixOS/nix/commit/faa31f40 --- src/hydra-queue-runner/nar-extractor.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/hydra-queue-runner/nar-extractor.cc b/src/hydra-queue-runner/nar-extractor.cc index 5c2cd97c..260296c9 100644 --- a/src/hydra-queue-runner/nar-extractor.cc +++ b/src/hydra-queue-runner/nar-extractor.cc @@ -45,15 +45,15 @@ struct Extractor : ParseSink hashSink = std::make_unique(htSHA256); } - void receiveContents(unsigned char * data, size_t len) override + void receiveContents(std::string_view data) override { assert(expectedSize); assert(curMember); assert(hashSink); - *curMember->fileSize += len; - (*hashSink)(data, len); + *curMember->fileSize += data.size(); + (*hashSink)(data); if (curMember->contents) { - curMember->contents->append((char *) data, len); + curMember->contents->append(data); } assert(curMember->fileSize <= expectedSize); if (curMember->fileSize == expectedSize) {