mirror of
https://github.com/NixOS/nix
synced 2025-06-25 19:01:16 +02:00
Simplify Implementations registration
This commit is contained in:
parent
93844a5998
commit
f59ccb468e
3 changed files with 8 additions and 7 deletions
|
@ -1355,7 +1355,7 @@ ref<Store> openStore(StoreReference && storeURI)
|
|||
return std::make_shared<LocalStore>(params);
|
||||
},
|
||||
[&](const StoreReference::Specified & g) {
|
||||
for (const auto & implem : *Implementations::registered)
|
||||
for (const auto & implem : Implementations::registered())
|
||||
if (implem.uriSchemes.count(g.scheme))
|
||||
return implem.create(g.scheme, g.authority, params);
|
||||
|
||||
|
@ -1399,6 +1399,4 @@ std::list<ref<Store>> getDefaultSubstituters()
|
|||
return stores;
|
||||
}
|
||||
|
||||
std::vector<StoreFactory> * Implementations::registered = 0;
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue