1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-25 14:51:16 +02:00

Remove EvalState::mkAttrs()

This commit is contained in:
Eelco Dolstra 2022-01-04 20:29:17 +01:00
parent 17daec0b83
commit 2b4c944823
6 changed files with 52 additions and 42 deletions

View file

@ -37,10 +37,10 @@ class JSONSax : nlohmann::json_sax<json> {
ValueMap attrs;
std::unique_ptr<JSONState> resolve(EvalState & state) override
{
Value & v = parent->value(state);
state.mkAttrs(v, attrs.size());
auto attrs2 = state.buildBindings(attrs.size());
for (auto & i : attrs)
v.attrs->push_back(Attr(i.first, i.second));
attrs2.insert(i.first, i.second);
parent->value(state).mkAttrs(attrs2.alreadySorted());
return std::move(parent);
}
void add() override { v = nullptr; }