mirror of
https://github.com/NixOS/nix.git
synced 2025-11-21 09:49:36 +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
|
|
@ -160,7 +160,7 @@ void LocalStore::optimisePath_(
|
|||
{make_ref<PosixSourceAccessor>(), CanonPath(path)},
|
||||
FileSerialisationMethod::NixArchive,
|
||||
HashAlgorithm::SHA256)
|
||||
.first;
|
||||
.hash;
|
||||
});
|
||||
debug("'%1%' has hash '%2%'", path, hash.to_string(HashFormat::Nix32, true));
|
||||
|
||||
|
|
@ -175,7 +175,7 @@ void LocalStore::optimisePath_(
|
|||
PosixSourceAccessor::createAtRoot(linkPath),
|
||||
FileSerialisationMethod::NixArchive,
|
||||
HashAlgorithm::SHA256)
|
||||
.first;
|
||||
.hash;
|
||||
}))) {
|
||||
// XXX: Consider overwriting linkPath with our valid version.
|
||||
warn("removing corrupted link %s", linkPath);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue