diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2020-08-01 19:38:35 +0000 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2020-08-01 19:38:35 +0000 |
commit | 9357512d7379337c3636fa495ad7b4bbe3d8266d (patch) | |
tree | f15faf862e683e2c8987005ef4c11f3391433e44 /src/libstore/content-address.cc | |
parent | e3b394b6e8420795c1976195184921df2c2b3e83 (diff) | |
parent | a3f9625818ecb0c8a3c22c191340dac5a3120bb5 (diff) |
Merge remote-tracking branch 'upstream/master' into derivation-header-include-order
Diffstat (limited to 'src/libstore/content-address.cc')
-rw-r--r-- | src/libstore/content-address.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstore/content-address.cc b/src/libstore/content-address.cc index 6cb69d0a9..f83b98a98 100644 --- a/src/libstore/content-address.cc +++ b/src/libstore/content-address.cc @@ -3,7 +3,7 @@ namespace nix { std::string FixedOutputHash::printMethodAlgo() const { - return makeFileIngestionPrefix(method) + printHashType(*hash.type); + return makeFileIngestionPrefix(method) + printHashType(hash.type); } std::string makeFileIngestionPrefix(const FileIngestionMethod m) { @@ -46,7 +46,7 @@ ContentAddress parseContentAddress(std::string_view rawCa) { if (prefix == "text") { auto hashTypeAndHash = rawCa.substr(prefixSeparator+1, string::npos); Hash hash = Hash(string(hashTypeAndHash)); - if (*hash.type != htSHA256) { + if (hash.type != htSHA256) { throw Error("parseContentAddress: the text hash should have type SHA256"); } return TextHash { hash }; |