From f7ea650142eb796eb3f2827c805cc0bc563e2183 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Tue, 22 Dec 2020 21:51:50 +0100 Subject: refactor(tvix/libexpr): Remove Bindings::SortedByKeys() Since we don't have a Bindings implementation with unstable order this function is not required, as its callers can just iterate over the attributes instead. Change-Id: I01b35277b5a2dde69d684bc881dbd7c0701bcbb3 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2291 Tested-by: BuildkiteCI Reviewed-by: glittershark --- third_party/nix/src/libexpr/eval.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'third_party/nix/src/libexpr/eval.cc') diff --git a/third_party/nix/src/libexpr/eval.cc b/third_party/nix/src/libexpr/eval.cc index f7b745a7b4..682ea64832 100644 --- a/third_party/nix/src/libexpr/eval.cc +++ b/third_party/nix/src/libexpr/eval.cc @@ -102,9 +102,9 @@ static void printValue(std::ostream& str, std::set& active, break; case tAttrs: { str << "{ "; - for (auto& i : v.attrs->SortedByKeys()) { - str << i->name << " = "; - printValue(str, active, *i->value); + for (const auto& [key, value] : *v.attrs) { + str << key << " = "; + printValue(str, active, *value.value); str << "; "; } str << "}"; -- cgit 1.4.1