about summary refs log tree commit diff
path: root/third_party/nix/src/libexpr/attr-set.cc
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/nix/src/libexpr/attr-set.cc')
-rw-r--r--third_party/nix/src/libexpr/attr-set.cc11
1 files changed, 8 insertions, 3 deletions
diff --git a/third_party/nix/src/libexpr/attr-set.cc b/third_party/nix/src/libexpr/attr-set.cc
index e0fac9234b14..2df6bc9a2155 100644
--- a/third_party/nix/src/libexpr/attr-set.cc
+++ b/third_party/nix/src/libexpr/attr-set.cc
@@ -31,12 +31,17 @@ std::vector<const Attr*> Bindings::lexicographicOrder() {
 }
 
 Bindings::iterator Bindings::find(const Symbol& name) {
-  return &attributes_[name];
+  return attributes_.find(name);
 }
 
-Bindings::iterator Bindings::begin() { return &(attributes_.begin()->second); }
+Bindings::iterator Bindings::begin() {
+  return attributes_.begin();
+}
+
+Bindings::iterator Bindings::end() {
+  return attributes_.end();
+}
 
-Bindings::iterator Bindings::end() { return &(attributes_.end()->second); }
 void Bindings::merge(Bindings* other) {
   // We want the values from the other attribute set to take
   // precedence, but .merge() works the other way around.