aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/store-api.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstore/store-api.cc')
-rw-r--r--src/libstore/store-api.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/libstore/store-api.cc b/src/libstore/store-api.cc
index e8c1c1fdd..d0ef4e95b 100644
--- a/src/libstore/store-api.cc
+++ b/src/libstore/store-api.cc
@@ -949,8 +949,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) {