1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-13 14:02:42 +01:00

Make ValidPathInfo have plain StorePathSet references like before

This change can wait for another PR.
This commit is contained in:
John Ericson 2023-01-14 16:38:43 -05:00
parent 056cc1c1b9
commit b3d91239ae
24 changed files with 109 additions and 166 deletions

View file

@ -151,6 +151,16 @@ Hash getContentAddressHash(const ContentAddress & ca)
}, ca);
}
bool StoreReferences::empty() const
{
return !self && others.empty();
}
size_t StoreReferences::size() const
{
return (self ? 1 : 0) + others.size();
}
ContentAddressWithReferences caWithoutRefs(const ContentAddress & ca) {
return std::visit(overloaded {
[&](const TextHash & h) -> ContentAddressWithReferences {