mirror of
https://github.com/NixOS/nix
synced 2025-06-26 15:51:15 +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
|
@ -954,8 +954,7 @@ std::list<ref<Store>> getDefaultSubstituters()
|
|||
StringSet done;
|
||||
|
||||
auto addStore = [&](const std::string & uri) {
|
||||
if (done.count(uri)) return;
|
||||
done.insert(uri);
|
||||
if (!done.insert(uri).second) return;
|
||||
try {
|
||||
stores.push_back(openStore(uri));
|
||||
} catch (Error & e) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue