diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2020-06-19 20:22:36 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-19 20:22:36 +0200 |
commit | 984e521392b3f41f7cdab203e5c00f3e00e27a28 (patch) | |
tree | c63ca1c6b5d879a60b985bfa04f03b065d407594 /src/libstore/derivations.cc | |
parent | 424bb5819f736af7413c343d462663474222eaac (diff) | |
parent | 68294746aeb1d23d2859e5ccc1a0c971cd7d5120 (diff) |
Merge pull request #3650 from obsidiansystems/no-hash-type-unknown
Remove `HashType::htUnknown`
Diffstat (limited to 'src/libstore/derivations.cc')
-rw-r--r-- | src/libstore/derivations.cc | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/libstore/derivations.cc b/src/libstore/derivations.cc index 528b7ccea..a79b78db6 100644 --- a/src/libstore/derivations.cc +++ b/src/libstore/derivations.cc @@ -9,7 +9,7 @@ namespace nix { std::string DerivationOutputHash::printMethodAlgo() const { - return makeFileIngestionPrefix(method) + printHashType(hash.type); + return makeFileIngestionPrefix(method) + printHashType(*hash.type); } @@ -121,8 +121,6 @@ static DerivationOutput parseDerivationOutput(const Store & store, istringstream hashAlgo = string(hashAlgo, 2); } const HashType hashType = parseHashType(hashAlgo); - if (hashType == htUnknown) - throw Error("unknown hash hashAlgorithm '%s'", hashAlgo); fsh = DerivationOutputHash { .method = std::move(method), .hash = Hash(hash, hashType), @@ -421,8 +419,6 @@ static DerivationOutput readDerivationOutput(Source & in, const Store & store) hashAlgo = string(hashAlgo, 2); } const HashType hashType = parseHashType(hashAlgo); - if (hashType == htUnknown) - throw Error("unknown hash hashAlgorithm '%s'", hashAlgo); fsh = DerivationOutputHash { .method = std::move(method), .hash = Hash(hash, hashType), |