From b7ea84f90078a065b5072434aa044caff0b17a42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Mon, 18 Nov 2024 17:29:10 +0100 Subject: [PATCH] nixos-options: don't use references for string_views --- pkgs/tools/nix/nixos-option/src/libnix-copy-paste.cc | 2 +- pkgs/tools/nix/nixos-option/src/libnix-copy-paste.hh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/nix/nixos-option/src/libnix-copy-paste.cc b/pkgs/tools/nix/nixos-option/src/libnix-copy-paste.cc index 15a411258b93..e00418eb99e0 100644 --- a/pkgs/tools/nix/nixos-option/src/libnix-copy-paste.cc +++ b/pkgs/tools/nix/nixos-option/src/libnix-copy-paste.cc @@ -8,7 +8,7 @@ // NOLINTBEGIN // From nix/src/nix/repl.cc -bool isVarName(const std::string_view & s) +bool isVarName(std::string_view s) { if (s.size() == 0) return false; if (nix::isReservedKeyword(s)) return false; diff --git a/pkgs/tools/nix/nixos-option/src/libnix-copy-paste.hh b/pkgs/tools/nix/nixos-option/src/libnix-copy-paste.hh index 20a1f4b5817e..e26e57b0ea5c 100644 --- a/pkgs/tools/nix/nixos-option/src/libnix-copy-paste.hh +++ b/pkgs/tools/nix/nixos-option/src/libnix-copy-paste.hh @@ -2,4 +2,4 @@ #include -bool isVarName(const std::string_view & s); +bool isVarName(std::string_view s);