diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2020-06-02 15:52:13 +0000 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2020-06-02 15:52:13 +0000 |
commit | 450dcf2c1b60a36f5ffeab2411805287d122bcdd (patch) | |
tree | d1fe49020e97198147483f42454da46f36e42094 /src/libutil/args.cc | |
parent | 6dd471ebf6b9a4996405398093ccb371b8abdf2f (diff) |
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.
Diffstat (limited to 'src/libutil/args.cc')
-rw-r--r-- | src/libutil/args.cc | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/src/libutil/args.cc b/src/libutil/args.cc index 4a3f5aae8..c4035ab85 100644 --- a/src/libutil/args.cc +++ b/src/libutil/args.cc @@ -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); }} }; } |