diff --git a/src/libcmd/built-path.cc b/src/libcmd/built-path.cc index cd4af20a1ed0..8e2efc7c31b5 100644 --- a/src/libcmd/built-path.cc +++ b/src/libcmd/built-path.cc @@ -58,21 +58,6 @@ StorePathSet BuiltPath::outPaths() const ); } -StorePaths BuiltPath::outPaths2() const -{ - return std::visit( - overloaded{ - [](const BuiltPath::Opaque & p) { return StorePaths{p.path}; }, - [](const BuiltPath::Built & b) { - StorePaths res; - for (auto & [_, path] : b.outputs) - res.push_back(path); - return res; - }, - }, raw() - ); -} - SingleDerivedPath::Built SingleBuiltPath::Built::discardOutputPath() const { return SingleDerivedPath::Built { diff --git a/src/libcmd/built-path.hh b/src/libcmd/built-path.hh index 35cfa1466c20..99917e0eefba 100644 --- a/src/libcmd/built-path.hh +++ b/src/libcmd/built-path.hh @@ -87,7 +87,6 @@ struct BuiltPath : _BuiltPathRaw { } StorePathSet outPaths() const; - StorePaths outPaths2() const; RealisedPath::Set toRealisedPaths(Store & store) const; nlohmann::json toJSON(const StoreDirConfig & store) const; diff --git a/src/libcmd/installables.cc b/src/libcmd/installables.cc index f6acbc7c3fed..736c41a1eaeb 100644 --- a/src/libcmd/installables.cc +++ b/src/libcmd/installables.cc @@ -737,7 +737,7 @@ StorePaths Installable::toStorePaths( { StorePaths outPaths; for (auto & path : toBuiltPaths(evalStore, store, mode, operateOn, installables)) { - auto thisOutPaths = path.outPaths2(); + auto thisOutPaths = path.outPaths(); outPaths.insert(outPaths.end(), thisOutPaths.begin(), thisOutPaths.end()); } return outPaths;