mirror of
https://github.com/NixOS/nix.git
synced 2025-12-19 15:31:07 +01:00
libutil: Make HashResult a proper struct
This resolves an existing TODO and makes the code slightly more readable.
This commit is contained in:
parent
241420a788
commit
143bd60136
18 changed files with 56 additions and 50 deletions
|
|
@ -101,7 +101,7 @@ hashPath(const SourcePath & path, FileIngestionMethod method, HashAlgorithm ht,
|
|||
case FileIngestionMethod::Flat:
|
||||
case FileIngestionMethod::NixArchive: {
|
||||
auto res = hashPath(path, (FileSerialisationMethod) method, ht, filter);
|
||||
return {res.first, {res.second}};
|
||||
return {res.hash, res.numBytesDigested};
|
||||
}
|
||||
case FileIngestionMethod::Git:
|
||||
return {git::dumpHash(ht, path, filter).hash, std::nullopt};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue