1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-15 06:52:43 +01:00

WIP: Make Hash always store a valid hash type

This commit is contained in:
John Ericson 2020-06-19 18:41:33 +00:00
parent 984e521392
commit 507aa48739
29 changed files with 126 additions and 124 deletions

View file

@ -79,8 +79,8 @@ void RefScanSink::operator () (const unsigned char * data, size_t len)
}
PathSet scanForReferences(const string & path,
const PathSet & refs, HashResult & hash)
std::pair<PathSet, HashResult> scanForReferences(const string & path,
const PathSet & refs)
{
RefScanSink sink;
std::map<string, Path> backMap;
@ -112,9 +112,9 @@ PathSet scanForReferences(const string & path,
found.insert(j->second);
}
hash = sink.hashSink.finish();
auto hash = sink.hashSink.finish();
return found;
return std::pair<PathSet, HashResult>(found, hash);
}