mirror of
https://github.com/NixOS/nix
synced 2025-07-06 17:31:47 +02:00
Merge pull request #11682 from NaN-git/opt-str
Remove superfluous `std::string` copy operations
This commit is contained in:
commit
30c4f5eb51
16 changed files with 72 additions and 54 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(toView(s));
|
||||
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