diff options
Diffstat (limited to 'third_party/nix/src/libstore/parsed-derivations.cc')
-rw-r--r-- | third_party/nix/src/libstore/parsed-derivations.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/third_party/nix/src/libstore/parsed-derivations.cc b/third_party/nix/src/libstore/parsed-derivations.cc index 72ed36d32da6..ec158e0ab1a0 100644 --- a/third_party/nix/src/libstore/parsed-derivations.cc +++ b/third_party/nix/src/libstore/parsed-derivations.cc @@ -74,13 +74,13 @@ std::optional<Strings> ParsedDerivation::getStringsAttr( drvPath); } Strings res; - for (auto j = i->begin(); j != i->end(); ++j) { - if (!j->is_string()) { + for (const auto& j : *i) { + if (!j.is_string()) { throw Error( "attribute '%s' of derivation '%s' must be a list of strings", name, drvPath); } - res.push_back(j->get<std::string>()); + res.push_back(j.get<std::string>()); } return res; } |