aboutsummaryrefslogtreecommitdiff
path: root/src/nix/eval.cc
diff options
context:
space:
mode:
authorpennae <github@quasiparticle.net>2022-01-21 16:20:54 +0100
committerpennae <github@quasiparticle.net>2022-01-27 22:15:30 +0100
commitd439dceb3bc47f10a6f1f5b8cf4a5b17adc80071 (patch)
treea856e03791017e24325813c8f48825f4bb827c80 /src/nix/eval.cc
parent41d70a2fc8d243d8c83ecc1c9ba648b625957437 (diff)
optionally return string_view from coerceToString
we'll retain the old coerceToString interface that returns a string, but callers that don't need the returned value to outlive the Value it came from can save copies by using the new interface instead. for values that weren't stringy we'll pass a new buffer argument that'll be used for storage and shouldn't be inspected.
Diffstat (limited to 'src/nix/eval.cc')
-rw-r--r--src/nix/eval.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nix/eval.cc b/src/nix/eval.cc
index c7517cf79..c0435461f 100644
--- a/src/nix/eval.cc
+++ b/src/nix/eval.cc
@@ -107,7 +107,7 @@ struct CmdEval : MixJSON, InstallableCommand
else if (raw) {
stopProgressBar();
- std::cout << state->coerceToString(noPos, *v, context);
+ std::cout << *state->coerceToString(noPos, *v, context);
}
else if (json) {