mirror of
https://github.com/NixOS/nix.git
synced 2025-12-23 17:31:08 +01:00
Use named field initialization for references
This commit is contained in:
parent
8623143921
commit
6a168254ce
15 changed files with 34 additions and 26 deletions
|
|
@ -154,10 +154,16 @@ Hash getContentAddressHash(const ContentAddress & ca)
|
|||
ContentAddressWithReferences caWithoutRefs(const ContentAddress & ca) {
|
||||
return std::visit(overloaded {
|
||||
[&](const TextHash & h) -> ContentAddressWithReferences {
|
||||
return TextInfo { h, {}};
|
||||
return TextInfo {
|
||||
h,
|
||||
.references = {},
|
||||
};
|
||||
},
|
||||
[&](const FixedOutputHash & h) -> ContentAddressWithReferences {
|
||||
return FixedOutputInfo { h, {}};
|
||||
return FixedOutputInfo {
|
||||
h,
|
||||
.references = {},
|
||||
};
|
||||
},
|
||||
}, ca);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue