diff --git a/lix/libexpr/primops/fromTOML.cc b/lix/libexpr/primops/fromTOML.cc index a27604271..c08334003 100644 --- a/lix/libexpr/primops/fromTOML.cc +++ b/lix/libexpr/primops/fromTOML.cc @@ -18,14 +18,7 @@ void prim_fromTOML(EvalState & state, Value ** args, Value & val) switch (t.type()) { case toml::value_t::table: { auto table = toml::get(t); - - size_t size = 0; - for (auto & i : table) { - (void) i; - size++; - } - - auto attrs = state.ctx.buildBindings(size); + auto attrs = state.ctx.buildBindings(table.size()); for (auto & elem : table) { self(attrs.alloc(elem.first), elem.second);