diff options
author | Vincent Ambo <mail@tazj.in> | 2020-12-22T20·51+0100 |
---|---|---|
committer | tazjin <mail@tazj.in> | 2020-12-23T11·33+0000 |
commit | f7ea650142eb796eb3f2827c805cc0bc563e2183 (patch) | |
tree | 2d451749e40e0278aac89fe38dcbfa72015ccb95 /third_party/nix/src/libexpr/attr-set.cc | |
parent | 0f9a7b3f86f56162cf1a694d98d82e4937d44a52 (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/attr-set.cc')
-rw-r--r-- | third_party/nix/src/libexpr/attr-set.cc | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/third_party/nix/src/libexpr/attr-set.cc b/third_party/nix/src/libexpr/attr-set.cc index 808ffce176ee..b1617c981f51 100644 --- a/third_party/nix/src/libexpr/attr-set.cc +++ b/third_party/nix/src/libexpr/attr-set.cc @@ -32,17 +32,6 @@ size_t Bindings::size() const { return attributes_.size(); } bool Bindings::empty() { return attributes_.empty(); } -std::vector<const Attr*> Bindings::SortedByKeys() { - std::vector<const Attr*> res; - res.reserve(attributes_.size()); - - for (const auto& [key, value] : attributes_) { - res.emplace_back(&value); - } - - return res; -} - Bindings::iterator Bindings::find(const Symbol& name) { return attributes_.find(name); } |