From 41d70a2fc8d243d8c83ecc1c9ba648b625957437 Mon Sep 17 00:00:00 2001 From: pennae Date: Fri, 21 Jan 2022 14:44:00 +0100 Subject: return string_views from forceString* once a string has been forced we already have dynamic storage allocated for it, so we can easily reuse that storage instead of copying. --- src/libexpr/json-to-value.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libexpr/json-to-value.hh') diff --git a/src/libexpr/json-to-value.hh b/src/libexpr/json-to-value.hh index 3b0fdae11..84bec4eba 100644 --- a/src/libexpr/json-to-value.hh +++ b/src/libexpr/json-to-value.hh @@ -8,6 +8,6 @@ namespace nix { MakeError(JSONParseError, EvalError); -void parseJSON(EvalState & state, const string & s, Value & v); +void parseJSON(EvalState & state, const std::string_view & s, Value & v); } -- cgit v1.2.3