forked from lix-project/lix
Organize and format code a bit
This commit is contained in:
parent
45b6fdb22b
commit
1dfcbebc95
|
@ -31,7 +31,6 @@ template<> StorePathSet readStorePaths(const Store & store, Source & from)
|
||||||
return paths;
|
return paths;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void writeStorePaths(const Store & store, Sink & out, const StorePathSet & paths)
|
void writeStorePaths(const Store & store, Sink & out, const StorePathSet & paths)
|
||||||
{
|
{
|
||||||
out << paths.size();
|
out << paths.size();
|
||||||
|
@ -39,11 +38,6 @@ void writeStorePaths(const Store & store, Sink & out, const StorePathSet & paths
|
||||||
out << store.printStorePath(i);
|
out << store.printStorePath(i);
|
||||||
}
|
}
|
||||||
|
|
||||||
StorePath read(const Store & store, Source & from, Proxy<StorePath> _)
|
|
||||||
{
|
|
||||||
auto path = readString(from);
|
|
||||||
return store.parseStorePath(path);
|
|
||||||
}
|
|
||||||
|
|
||||||
StorePathCAMap readStorePathCAMap(const Store & store, Source & from)
|
StorePathCAMap readStorePathCAMap(const Store & store, Source & from)
|
||||||
{
|
{
|
||||||
|
@ -63,10 +57,17 @@ void writeStorePathCAMap(const Store & store, Sink & out, const StorePathCAMap &
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
StorePath read(const Store & store, Source & from, Proxy<StorePath> _)
|
||||||
|
{
|
||||||
|
auto path = readString(from);
|
||||||
|
return store.parseStorePath(path);
|
||||||
|
}
|
||||||
|
|
||||||
void write(const Store & store, Sink & out, const StorePath & storePath)
|
void write(const Store & store, Sink & out, const StorePath & storePath)
|
||||||
{
|
{
|
||||||
auto path = store.printStorePath(storePath);
|
auto path = store.printStorePath(storePath);
|
||||||
out << path;
|
out << path;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -362,14 +362,14 @@ bool Store::PathInfoCacheValue::isKnownNow()
|
||||||
}
|
}
|
||||||
|
|
||||||
OutputPathMap Store::queryDerivationOutputMapAssumeTotal(const StorePath & path) {
|
OutputPathMap Store::queryDerivationOutputMapAssumeTotal(const StorePath & path) {
|
||||||
auto resp = queryDerivationOutputMap(path);
|
auto resp = queryDerivationOutputMap(path);
|
||||||
OutputPathMap result;
|
OutputPathMap result;
|
||||||
for (auto & [outName, optOutPath] : resp) {
|
for (auto & [outName, optOutPath] : resp) {
|
||||||
if (!optOutPath)
|
if (!optOutPath)
|
||||||
throw Error("output '%s' has no store path mapped to it", outName);
|
throw Error("output '%s' has no store path mapped to it", outName);
|
||||||
result.insert_or_assign(outName, *optOutPath);
|
result.insert_or_assign(outName, *optOutPath);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
StorePathSet Store::queryDerivationOutputs(const StorePath & path)
|
StorePathSet Store::queryDerivationOutputs(const StorePath & path)
|
||||||
|
|
Loading…
Reference in a new issue