mirror of
https://github.com/NixOS/nix
synced 2025-07-06 17:31:47 +02:00
cleanup: remove superfluous std::string copies
This commit is contained in:
parent
3e7b42dd89
commit
4c0c8e5428
8 changed files with 22 additions and 26 deletions
|
@ -66,7 +66,7 @@ static void prim_fromTOML(EvalState & state, const PosIdx pos, Value * * args, V
|
|||
attrs.alloc("_type").mkString("timestamp");
|
||||
std::ostringstream s;
|
||||
s << t;
|
||||
attrs.alloc("value").mkString(s.str());
|
||||
attrs.alloc("value").mkString(s.view());
|
||||
v.mkAttrs(attrs);
|
||||
} else {
|
||||
throw std::runtime_error("Dates and times are not supported");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue