mirror of
https://github.com/NixOS/nix
synced 2025-06-28 05:21:16 +02:00
OCD performance fix: {find,count}+insert => insert
This commit is contained in:
parent
e6e61f0a54
commit
99b73fb507
16 changed files with 32 additions and 65 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue