mirror of
https://github.com/NixOS/nix.git
synced 2024-11-22 06:42:28 +00:00
Use mkStringNoCopy for some more string literals
This commit is contained in:
parent
ceb8833eb9
commit
561149b84f
@ -63,7 +63,7 @@ static void prim_fromTOML(EvalState & state, const PosIdx pos, Value * * args, V
|
||||
{
|
||||
if (experimentalFeatureSettings.isEnabled(Xp::ParseTomlTimestamps)) {
|
||||
auto attrs = state.buildBindings(2);
|
||||
attrs.alloc("_type").mkString("timestamp");
|
||||
attrs.alloc("_type").mkStringNoCopy("timestamp");
|
||||
std::ostringstream s;
|
||||
s << t;
|
||||
attrs.alloc("value").mkString(s.str());
|
||||
|
@ -61,7 +61,7 @@ bool createUserEnv(EvalState & state, PackageInfos & elems,
|
||||
|
||||
auto attrs = state.buildBindings(7 + outputs.size());
|
||||
|
||||
attrs.alloc(state.sType).mkString("derivation");
|
||||
attrs.alloc(state.sType).mkStringNoCopy("derivation");
|
||||
attrs.alloc(state.sName).mkString(i.queryName());
|
||||
auto system = i.querySystem();
|
||||
if (!system.empty())
|
||||
|
Loading…
Reference in New Issue
Block a user