From 1b4aa5c1ef7d3a04ca4ec01a98306a180636cfc8 Mon Sep 17 00:00:00 2001 From: Sergei Zimmerman Date: Fri, 8 Aug 2025 01:20:50 +0300 Subject: [PATCH] libstore: Remove unused overload of scanForReferences This doesn't seem to be used anywhere at the moment. It might be used out-of-tree, but this is a small convenience function that is not worth keeping without in-tree usage. --- src/libstore/include/nix/store/path-references.hh | 2 -- src/libstore/path-references.cc | 8 -------- 2 files changed, 10 deletions(-) diff --git a/src/libstore/include/nix/store/path-references.hh b/src/libstore/include/nix/store/path-references.hh index fad1e57a3..55535f666 100644 --- a/src/libstore/include/nix/store/path-references.hh +++ b/src/libstore/include/nix/store/path-references.hh @@ -6,8 +6,6 @@ namespace nix { -std::pair scanForReferences(const Path & path, const StorePathSet & refs); - StorePathSet scanForReferences(Sink & toTee, const Path & path, const StorePathSet & refs); class PathRefScanSink : public RefScanSink diff --git a/src/libstore/path-references.cc b/src/libstore/path-references.cc index 2c71f437f..8b167e902 100644 --- a/src/libstore/path-references.cc +++ b/src/libstore/path-references.cc @@ -43,14 +43,6 @@ StorePathSet PathRefScanSink::getResultPaths() return found; } -std::pair scanForReferences(const std::string & path, const StorePathSet & refs) -{ - HashSink hashSink{HashAlgorithm::SHA256}; - auto found = scanForReferences(hashSink, path, refs); - auto hash = hashSink.finish(); - return std::pair(found, hash); -} - StorePathSet scanForReferences(Sink & toTee, const Path & path, const StorePathSet & refs) { PathRefScanSink refsSink = PathRefScanSink::fromPaths(refs);