aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr/eval-settings.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/libexpr/eval-settings.cc')
-rw-r--r--src/libexpr/eval-settings.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libexpr/eval-settings.cc b/src/libexpr/eval-settings.cc
index 89ca198d8..046ca557d 100644
--- a/src/libexpr/eval-settings.cc
+++ b/src/libexpr/eval-settings.cc
@@ -29,7 +29,7 @@ static Strings parseNixPath(const std::string & s)
if (*p == ':') {
auto prefix = std::string(start2, s.end());
- if (EvalSettings::isPseudoUrl(prefix) || hasPrefix(prefix, "flake:")) {
+ if (EvalSettings::isPseudoUrl(prefix) || prefix.starts_with("flake:")) {
++p;
while (p != s.end() && *p != ':') ++p;
}
@@ -82,7 +82,7 @@ bool EvalSettings::isPseudoUrl(std::string_view s)
std::string EvalSettings::resolvePseudoUrl(std::string_view url)
{
- if (hasPrefix(url, "channel:"))
+ if (url.starts_with("channel:"))
return "https://nixos.org/channels/" + std::string(url.substr(8)) + "/nixexprs.tar.xz";
else
return std::string(url);