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:
parent
558c4ee3e3
commit
0d7fae6a57
8 changed files with 32 additions and 23 deletions
|
|
@ -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>();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue