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 <grfn@gws.fyi>
This commit is contained in:
Vincent Ambo 2020-12-22 21:51:50 +01:00 committed by tazjin
parent 0f9a7b3f86
commit f7ea650142
5 changed files with 46 additions and 64 deletions

View file

@ -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 << "}";