aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr/eval.cc
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2023-08-16 12:04:15 -0400
committerJohn Ericson <John.Ericson@Obsidian.Systems>2023-08-18 14:04:33 -0400
commitfe71faa920ef34b67f56232decc22cf5706a00dd (patch)
treec23b211ecf832d2a9b8daa52a04c6e3b30c983f5 /src/libexpr/eval.cc
parent665ad4f7c506d3274db564d6c3c20526dca218e0 (diff)
Delete `EvalState::addToSearchPath`
This function is now trivial enough that it doesn't need to exist. `EvalState` can still be initialized with a custom search path, but we don't have a need to mutate the search path after it has been constructed, and I don't see why we would need to in the future. Fixes #8229
Diffstat (limited to 'src/libexpr/eval.cc')
-rw-r--r--src/libexpr/eval.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libexpr/eval.cc b/src/libexpr/eval.cc
index 7e839dbe7..6d445fd96 100644
--- a/src/libexpr/eval.cc
+++ b/src/libexpr/eval.cc
@@ -527,9 +527,9 @@ EvalState::EvalState(
/* Initialise the Nix expression search path. */
if (!evalSettings.pureEval) {
for (auto & i : _searchPath.elements)
- addToSearchPath(SearchPath::Elem {i});
+ searchPath.elements.emplace_back(SearchPath::Elem {i});
for (auto & i : evalSettings.nixPath.get())
- addToSearchPath(SearchPath::Elem::parse(i));
+ searchPath.elements.emplace_back(SearchPath::Elem::parse(i));
}
if (evalSettings.restrictEval || evalSettings.pureEval) {