about summary refs log tree commit diff
path: root/third_party/nix/src/libexpr/eval.cc
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2020-12-22T20·51+0100
committertazjin <mail@tazj.in>2020-12-23T11·33+0000
commitf7ea650142eb796eb3f2827c805cc0bc563e2183 (patch)
tree2d451749e40e0278aac89fe38dcbfa72015ccb95 /third_party/nix/src/libexpr/eval.cc
parent0f9a7b3f86f56162cf1a694d98d82e4937d44a52 (diff)
refactor(tvix/libexpr): Remove Bindings::SortedByKeys() r/2028
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 <grfn@gws.fyi>
Diffstat (limited to 'third_party/nix/src/libexpr/eval.cc')
-rw-r--r--third_party/nix/src/libexpr/eval.cc6
1 files changed, 3 insertions, 3 deletions
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<const Value*>& 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 << "}";