mirror of
https://github.com/NixOS/nix
synced 2025-06-27 12:41:15 +02:00
SymbolStr: Remove std::string conversion
This refactoring allows the symbol table to be stored as something other than std::strings.
This commit is contained in:
parent
0363dbf2b9
commit
61080554ab
15 changed files with 37 additions and 37 deletions
|
@ -98,7 +98,7 @@ static std::map<FlakeId, FlakeInput> parseFlakeInputs(
|
|||
const std::optional<Path> & baseDir, InputPath lockRootPath);
|
||||
|
||||
static FlakeInput parseFlakeInput(EvalState & state,
|
||||
const std::string & inputName, Value * value, const PosIdx pos,
|
||||
std::string_view inputName, Value * value, const PosIdx pos,
|
||||
const std::optional<Path> & baseDir, InputPath lockRootPath)
|
||||
{
|
||||
expectType(state, nAttrs, *value, pos);
|
||||
|
@ -178,7 +178,7 @@ static FlakeInput parseFlakeInput(EvalState & state,
|
|||
}
|
||||
|
||||
if (!input.follows && !input.ref)
|
||||
input.ref = FlakeRef::fromAttrs({{"type", "indirect"}, {"id", inputName}});
|
||||
input.ref = FlakeRef::fromAttrs({{"type", "indirect"}, {"id", std::string(inputName)}});
|
||||
|
||||
return input;
|
||||
}
|
||||
|
@ -244,7 +244,7 @@ static Flake readFlake(
|
|||
for (auto & formal : outputs->value->payload.lambda.fun->formals->formals) {
|
||||
if (formal.name != state.sSelf)
|
||||
flake.inputs.emplace(state.symbols[formal.name], FlakeInput {
|
||||
.ref = parseFlakeRef(state.symbols[formal.name])
|
||||
.ref = parseFlakeRef(std::string(state.symbols[formal.name]))
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue