diff options
author | Adam Joseph <adam@westernsemico.com> | 2022-10-10T18·43-0700 |
---|---|---|
committer | Adam Joseph <adam@westernsemico.com> | 2022-10-12T08·09+0000 |
commit | 32ac7d6c6d06b5191fcc828b762b247b0e27dfda (patch) | |
tree | 2ab484b94369b3a073f64b51360a57a1d20a4d80 /tvix/eval/src/eval.rs | |
parent | 04fccd89a50df7e36129493110f38c69563d941b (diff) |
refactor(tvix/eval) s/NixPath/NixSearchPath/ r/5113
Since NixString is the Rust type for nix strings, people might mistake NixPath for the Rust type of nix paths, which it is not. Let's call it NixSearchPath instead. Signed-off-by: Adam Joseph <adam@westernsemico.com> Change-Id: Ib2ea155c4b27cb90d6180a04ea7b951d86607373 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6927 Reviewed-by: kanepyork <rikingcoding@gmail.com> Tested-by: BuildkiteCI Reviewed-by: tazjin <tazjin@tvl.su>
Diffstat (limited to 'tvix/eval/src/eval.rs')
-rw-r--r-- | tvix/eval/src/eval.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tvix/eval/src/eval.rs b/tvix/eval/src/eval.rs index 809c8729f711..8973c1a95c19 100644 --- a/tvix/eval/src/eval.rs +++ b/tvix/eval/src/eval.rs @@ -3,7 +3,7 @@ use std::{cell::RefCell, path::PathBuf, rc::Rc}; use crate::{ builtins::global_builtins, errors::{Error, ErrorKind, EvalResult}, - nix_path::NixPath, + nix_search_path::NixSearchPath, observer::{DisassemblingObserver, NoOpObserver, TracingObserver}, value::Value, SourceCode, @@ -27,7 +27,7 @@ pub struct Options { /// A colon-separated list of directories to use to resolve `<...>`-style paths #[cfg_attr(feature = "repl", clap(long, short = 'I', env = "NIX_PATH"))] - nix_path: Option<NixPath>, + nix_search_path: Option<NixSearchPath>, } pub fn interpret(code: &str, location: Option<PathBuf>, options: Options) -> EvalResult<Value> { @@ -111,13 +111,13 @@ pub fn interpret(code: &str, location: Option<PathBuf>, options: Options) -> Eva let result = if options.trace_runtime { crate::vm::run_lambda( - options.nix_path.unwrap_or_default(), + options.nix_search_path.unwrap_or_default(), &mut TracingObserver::new(std::io::stderr()), result.lambda, ) } else { crate::vm::run_lambda( - options.nix_path.unwrap_or_default(), + options.nix_search_path.unwrap_or_default(), &mut NoOpObserver::default(), result.lambda, ) |