diff options
author | regnat <rg@regnat.ovh> | 2021-05-26 09:39:29 +0200 |
---|---|---|
committer | regnat <rg@regnat.ovh> | 2021-05-26 09:39:29 +0200 |
commit | 129384bcf3bf903ef1c6661b3f21659a2ad94228 (patch) | |
tree | 6bfe5e0f9e4754d7a15b5e08ea1329d8b5d58c6f /src/nix | |
parent | 79ae9e4558cbefd743f28a5e73110c2303b03a85 (diff) |
Remove the remaining occurenceses of a NarHash modulo
Diffstat (limited to 'src/nix')
-rw-r--r-- | src/nix/verify.cc | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/nix/verify.cc b/src/nix/verify.cc index 1721c7f16..f5a576064 100644 --- a/src/nix/verify.cc +++ b/src/nix/verify.cc @@ -97,15 +97,11 @@ struct CmdVerify : StorePathsCommand if (!noContents) { - std::unique_ptr<AbstractHashSink> hashSink; - if (!info->ca) - hashSink = std::make_unique<HashSink>(info->narHash.type); - else - hashSink = std::make_unique<HashModuloSink>(info->narHash.type, std::string(info->path.hashPart())); + auto hashSink = HashSink(info->narHash.type); - store->narFromPath(info->path, *hashSink); + store->narFromPath(info->path, hashSink); - auto hash = hashSink->finish(); + auto hash = hashSink.finish(); if (hash.first != info->narHash) { corrupted++; |