aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr/get-drvs.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/libexpr/get-drvs.cc')
-rw-r--r--src/libexpr/get-drvs.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/libexpr/get-drvs.cc b/src/libexpr/get-drvs.cc
index 21a4d7917..4e22a1d77 100644
--- a/src/libexpr/get-drvs.cc
+++ b/src/libexpr/get-drvs.cc
@@ -277,8 +277,7 @@ static bool getDerivation(EvalState & state, Value & v,
/* Remove spurious duplicates (e.g., a set like `rec { x =
derivation {...}; y = x;}'. */
- if (done.find(v.attrs) != done.end()) return false;
- done.insert(v.attrs);
+ if (!done.insert(v.attrs).second) return false;
DrvInfo drv(state, attrPath, v.attrs);