1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-04 11:21:47 +02:00

Remove redundant resolvedRef fields since they're already in SourceInfo

This commit is contained in:
Eelco Dolstra 2019-05-28 13:12:43 +02:00
parent 4846304541
commit dda4f7167b
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE
4 changed files with 36 additions and 34 deletions

View file

@ -92,7 +92,6 @@ struct Flake
{
FlakeId id;
FlakeRef originalRef;
FlakeRef resolvedRef;
std::string description;
SourceInfo sourceInfo;
std::vector<FlakeRef> requires;
@ -100,18 +99,17 @@ struct Flake
Value * vProvides; // FIXME: gc
unsigned int epoch;
Flake(const FlakeRef & origRef, const SourceInfo & sourceInfo) : originalRef(origRef),
resolvedRef(sourceInfo.resolvedRef), sourceInfo(sourceInfo) {};
Flake(const FlakeRef & origRef, const SourceInfo & sourceInfo)
: originalRef(origRef), sourceInfo(sourceInfo) {};
};
struct NonFlake
{
FlakeAlias alias;
FlakeRef originalRef;
FlakeRef resolvedRef;
SourceInfo sourceInfo;
NonFlake(const FlakeRef & origRef, const SourceInfo & sourceInfo) :
originalRef(origRef), resolvedRef(sourceInfo.resolvedRef), sourceInfo(sourceInfo) {};
NonFlake(const FlakeRef & origRef, const SourceInfo & sourceInfo)
: originalRef(origRef), sourceInfo(sourceInfo) {};
};
Flake getFlake(EvalState &, const FlakeRef &, bool impureIsAllowed);