Merge openStore and openStoreAt with default arguments
This commit is contained in:
		
							parent
							
								
									87b189c2b3
								
							
						
					
					
						commit
						a91954f0c6
					
				
					 6 changed files with 8 additions and 18 deletions
				
			
		| 
						 | 
				
			
			@ -506,7 +506,7 @@ namespace nix {
 | 
			
		|||
RegisterStoreImplementation::Implementations * RegisterStoreImplementation::implementations = 0;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
ref<Store> openStoreAt(const std::string & uri_)
 | 
			
		||||
ref<Store> openStore(const std::string & uri_)
 | 
			
		||||
{
 | 
			
		||||
    auto uri(uri_);
 | 
			
		||||
    Store::Params params;
 | 
			
		||||
| 
						 | 
				
			
			@ -529,12 +529,6 @@ ref<Store> openStoreAt(const std::string & uri_)
 | 
			
		|||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
ref<Store> openStore()
 | 
			
		||||
{
 | 
			
		||||
    return openStoreAt(getEnv("NIX_REMOTE"));
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
static RegisterStoreImplementation regStore([](
 | 
			
		||||
    const std::string & uri, const Store::Params & params)
 | 
			
		||||
    -> std::shared_ptr<Store>
 | 
			
		||||
| 
						 | 
				
			
			@ -579,7 +573,7 @@ std::list<ref<Store>> getDefaultSubstituters()
 | 
			
		|||
    auto addStore = [&](const std::string & uri) {
 | 
			
		||||
        if (done.count(uri)) return;
 | 
			
		||||
        done.insert(uri);
 | 
			
		||||
        state->stores.push_back(openStoreAt(uri));
 | 
			
		||||
        state->stores.push_back(openStore(uri));
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    for (auto uri : settings.get("substituters", Strings()))
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue