1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-18 00:12:43 +01:00

convert a for more utilities to string_view

This commit is contained in:
pennae 2022-01-21 17:55:51 +01:00
parent 558c4ee3e3
commit 0d7fae6a57
8 changed files with 32 additions and 23 deletions

View file

@ -170,7 +170,7 @@ std::string writeStructuredAttrsShell(const nlohmann::json & json)
auto handleSimpleType = [](const nlohmann::json & value) -> std::optional<std::string> {
if (value.is_string())
return shellEscape(value);
return shellEscape(value.get<std::string_view>());
if (value.is_number()) {
auto f = value.get<float>();