1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-25 19:01:16 +02:00

Simplify Implementations registration

This commit is contained in:
Eelco Dolstra 2025-05-05 08:41:23 +02:00
parent 93844a5998
commit f59ccb468e
3 changed files with 8 additions and 7 deletions

View file

@ -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;
}