mirror of
https://github.com/NixOS/nix
synced 2025-07-07 10:11:47 +02:00
Introduce OutputName
and OutputNameView
type aliases
Hopefully they make the code easier to understand!
This commit is contained in:
parent
0a6ac133cf
commit
2f5d3da806
11 changed files with 45 additions and 33 deletions
|
@ -34,7 +34,7 @@ struct DrvOutput {
|
|||
/**
|
||||
* The name of the output.
|
||||
*/
|
||||
std::string outputName;
|
||||
OutputName outputName;
|
||||
|
||||
std::string to_string() const;
|
||||
|
||||
|
@ -84,7 +84,7 @@ struct Realisation {
|
|||
* Since these are the outputs of a single derivation, we know the
|
||||
* output names are unique so we can use them as the map key.
|
||||
*/
|
||||
typedef std::map<std::string, Realisation> SingleDrvOutputs;
|
||||
typedef std::map<OutputName, Realisation> SingleDrvOutputs;
|
||||
|
||||
/**
|
||||
* Collection type for multiple derivations' outputs' `Realisation`s.
|
||||
|
@ -146,7 +146,7 @@ public:
|
|||
MissingRealisation(DrvOutput & outputId)
|
||||
: MissingRealisation(outputId.outputName, outputId.strHash())
|
||||
{}
|
||||
MissingRealisation(std::string_view drv, std::string outputName)
|
||||
MissingRealisation(std::string_view drv, OutputName outputName)
|
||||
: Error( "cannot operate on output '%s' of the "
|
||||
"unbuilt derivation '%s'",
|
||||
outputName,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue