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:
@@ -162,8 +162,6 @@ Args::Flag Args::Flag::mkHashTypeFlag(std::string && longName, HashType * ht)
|
||||
.labels = {"hash-algo"},
|
||||
.handler = {[ht](std::string s) {
|
||||
*ht = parseHashType(s);
|
||||
if (*ht == HashType::Unknown)
|
||||
throw UsageError("unknown hash type '%1%'", s);
|
||||
}}
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user