diff options
author | Florian Klink <flokli@flokli.de> | 2023-05-21T08·17+0300 |
---|---|---|
committer | flokli <flokli@flokli.de> | 2023-05-22T09·43+0000 |
commit | 11771a06aed715b5e7a921b879e9415ccad48711 (patch) | |
tree | 7240bc5d4117ae1530fce7f1855c90ebe756bca1 /tvix/eval/src/vm/generators.rs | |
parent | b4bb9062eaa14e654f51a20b7c94656f7cd49858 (diff) |
refactor(tvix/eval): use &Path instead of PathBuf r/6173
This allows getting rid of some clones in eval/src/vm/generators.rs. Change-Id: I330390307d3bcfeef19c98954c753ee55b1ccee3 Reviewed-on: https://cl.tvl.fyi/c/depot/+/8604 Autosubmit: flokli <flokli@flokli.de> Tested-by: BuildkiteCI Reviewed-by: tazjin <tazjin@tvl.su>
Diffstat (limited to 'tvix/eval/src/vm/generators.rs')
-rw-r--r-- | tvix/eval/src/vm/generators.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tvix/eval/src/vm/generators.rs b/tvix/eval/src/vm/generators.rs index 0e3123ae3758..f86683dff542 100644 --- a/tvix/eval/src/vm/generators.rs +++ b/tvix/eval/src/vm/generators.rs @@ -421,7 +421,7 @@ impl<'o> VM<'o> { VMRequest::ReadToString(path) => { let content = self .io_handle - .read_to_string(path.clone()) + .read_to_string(&path) .map_err(|e| ErrorKind::IO { path: Some(path), error: e.into(), @@ -434,7 +434,7 @@ impl<'o> VM<'o> { VMRequest::PathExists(path) => { let exists = self .io_handle - .path_exists(path.clone()) + .path_exists(&path) .map_err(|e| ErrorKind::IO { path: Some(path), error: e.into(), @@ -448,7 +448,7 @@ impl<'o> VM<'o> { VMRequest::ReadDir(path) => { let dir = self .io_handle - .read_dir(path.clone()) + .read_dir(&path) .map_err(|e| ErrorKind::IO { path: Some(path), error: e.into(), |