diff options
Diffstat (limited to 'src/libexpr/flake')
-rw-r--r-- | src/libexpr/flake/config.cc | 2 | ||||
-rw-r--r-- | src/libexpr/flake/flakeref.cc | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/libexpr/flake/config.cc b/src/libexpr/flake/config.cc index e89014862..b9613462a 100644 --- a/src/libexpr/flake/config.cc +++ b/src/libexpr/flake/config.cc @@ -35,7 +35,7 @@ void ConfigFile::apply() for (auto & [name, value] : settings) { - auto baseName = hasPrefix(name, "extra-") ? std::string(name, 6) : name; + auto baseName = name.starts_with("extra-") ? std::string(name, 6) : name; // FIXME: Move into libutil/config.cc. std::string valueS; diff --git a/src/libexpr/flake/flakeref.cc b/src/libexpr/flake/flakeref.cc index e1bce90bc..1c90bfc43 100644 --- a/src/libexpr/flake/flakeref.cc +++ b/src/libexpr/flake/flakeref.cc @@ -186,7 +186,7 @@ std::pair<FlakeRef, std::string> parseFlakeRefWithFragment( } } else { - if (!hasPrefix(path, "/")) + if (!path.starts_with("/")) throw BadURL("flake reference '%s' is not an absolute path", url); auto query = decodeQuery(match[2]); path = canonPath(path + "/" + getOr(query, "dir", "")); |