1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-25 14:51:16 +02:00

ExprString: Avoid copy of string

This commit is contained in:
Et7f3 2023-02-11 00:34:31 +01:00
parent 3d16f2a281
commit fa89d317b7
2 changed files with 3 additions and 3 deletions

View file

@ -186,7 +186,7 @@ struct ExprString : Expr
{
std::string s;
Value v;
ExprString(std::string s) : s(std::move(s)) { v.mkString(this->s.data()); };
ExprString(std::string &&s) : s(std::move(s)) { v.mkString(this->s.data()); };
Value * maybeThunk(EvalState & state, Env & env) override;
COMMON_METHODS
};