mirror of
https://github.com/NixOS/nix
synced 2025-06-25 14:51:16 +02:00
Remove EvalState::mkAttrs()
This commit is contained in:
parent
17daec0b83
commit
2b4c944823
6 changed files with 52 additions and 42 deletions
|
@ -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; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue