mirror of
https://github.com/NixOS/nix.git
synced 2025-11-13 14:02:42 +01:00
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:
parent
6dd471ebf6
commit
450dcf2c1b
14 changed files with 72 additions and 53 deletions
|
|
@ -20,8 +20,6 @@ void DerivationOutput::parseHashInfo(FileIngestionMethod & recursive, Hash & has
|
|||
}
|
||||
|
||||
HashType hashType = parseHashType(algo);
|
||||
if (hashType == HashType::Unknown)
|
||||
throw Error("unknown hash algorithm '%s'", algo);
|
||||
|
||||
hash = Hash(this->hash, hashType);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue