diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2020-06-02 15:52:13 +0000 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2020-06-02 15:52:13 +0000 |
commit | 450dcf2c1b60a36f5ffeab2411805287d122bcdd (patch) | |
tree | d1fe49020e97198147483f42454da46f36e42094 /src/nix/verify.cc | |
parent | 6dd471ebf6b9a4996405398093ccb371b8abdf2f (diff) |
Remove `HashType::Unknown`
Instead, `Hash` uses `std::optional<HashType>`. In the future, we may
also make `Hash` itself require a known hash type, encoraging people to
use `std::optional<Hash>` instead.
Diffstat (limited to 'src/nix/verify.cc')
-rw-r--r-- | src/nix/verify.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nix/verify.cc b/src/nix/verify.cc index 0c3478ff5..fa05e7353 100644 --- a/src/nix/verify.cc +++ b/src/nix/verify.cc @@ -88,9 +88,9 @@ struct CmdVerify : StorePathsCommand std::unique_ptr<AbstractHashSink> hashSink; if (info->ca == "") - hashSink = std::make_unique<HashSink>(info->narHash.type); + hashSink = std::make_unique<HashSink>(*info->narHash.type); else - hashSink = std::make_unique<HashModuloSink>(info->narHash.type, storePathToHash(store->printStorePath(info->path))); + hashSink = std::make_unique<HashModuloSink>(*info->narHash.type, storePathToHash(store->printStorePath(info->path))); store->narFromPath(info->path, *hashSink); |