mirror of
https://github.com/mhx/dwarfs.git
synced 2025-09-12 13:59:46 -04:00
fix: don't unnecessarily call value_parser twice
This commit is contained in:
parent
1ff2878e23
commit
04119a91f8
@ -92,7 +92,7 @@ bool parse_metadata_requirements_set(T& container, folly::dynamic& req,
|
||||
v.asString(), name, e.what()));
|
||||
}
|
||||
|
||||
if (auto maybe_value = value_parser(v)) {
|
||||
if (maybe_value) {
|
||||
if (!container.emplace(*maybe_value).second) {
|
||||
throw std::runtime_error(fmt::format(
|
||||
"duplicate value '{}' for requirement '{}'", v.asString(), name));
|
||||
|
Loading…
x
Reference in New Issue
Block a user