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.
This commit is contained in:
@@ -75,6 +75,6 @@ namespace nix {
|
||||
|
||||
TEST(hashString, hashingWithUnknownAlgoExits) {
|
||||
auto s = "unknown";
|
||||
ASSERT_DEATH(hashString(HashType::Unknown, s), "");
|
||||
ASSERT_DEATH(hashString(HashType::SHA512, s), "");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user