1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-16 15:32:43 +01:00

getUri should be const and on Store::Config not Store

It is a side-effect property of the configuration alone, not the rest of
the store.
This commit is contained in:
John Ericson 2025-08-11 17:28:01 -04:00
parent f93d25c0e7
commit 0ef6f72c9c
33 changed files with 123 additions and 122 deletions

View file

@ -53,7 +53,7 @@ RemoteStore::RemoteStore(const Config & config)
ref<RemoteStore::Connection> RemoteStore::openConnectionWrapper()
{
if (failed)
throw Error("opening a connection to remote store '%s' previously failed", getUri());
throw Error("opening a connection to remote store '%s' previously failed", config.getUri());
try {
return openConnection();
} catch (...) {
@ -95,7 +95,7 @@ void RemoteStore::initConnection(Connection & conn)
if (ex)
std::rethrow_exception(ex);
} catch (Error & e) {
throw Error("cannot open connection to remote store '%s': %s", getUri(), e.what());
throw Error("cannot open connection to remote store '%s': %s", config.getUri(), e.what());
}
setOptions(conn);