1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-26 20:01:15 +02:00

Make DerivedPathWithHints a newtype

This allows us to namespace its constructors under it.
This commit is contained in:
John Ericson 2021-04-05 10:05:21 -04:00
parent 9b805d36ac
commit 179582872d
8 changed files with 44 additions and 31 deletions

View file

@ -170,10 +170,10 @@ void MixProfile::updateProfile(const DerivedPathsWithHints & buildables)
for (auto & buildable : buildables) {
std::visit(overloaded {
[&](DerivedPathOpaque bo) {
[&](DerivedPathWithHints::Opaque bo) {
result.push_back(bo.path);
},
[&](DerivedPathWithHintsBuilt bfd) {
[&](DerivedPathWithHints::Built bfd) {
for (auto & output : bfd.outputs) {
/* Output path should be known because we just tried to
build it. */
@ -181,7 +181,7 @@ void MixProfile::updateProfile(const DerivedPathsWithHints & buildables)
result.push_back(*output.second);
}
},
}, buildable);
}, buildable.raw());
}
if (result.size() != 1)