mirror of
https://github.com/NixOS/nix
synced 2025-06-26 15:51:15 +02: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
|
@ -72,8 +72,6 @@ static int _main(int argc, char * * argv)
|
|||
else if (*arg == "--type") {
|
||||
string s = getArg(*arg, arg, end);
|
||||
ht = parseHashType(s);
|
||||
if (ht == HashType::Unknown)
|
||||
throw UsageError(format("unknown hash type '%1%'") % s);
|
||||
}
|
||||
else if (*arg == "--print-path")
|
||||
printPath = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue