From d25962b9a4d175faaf4ea9e08062036c0a3e0236 Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Thu, 25 May 2023 08:34:00 +0300 Subject: refactor(tvix/eval): stop borrowing &mut self This does undo cl/8571. Change-Id: Ib14b4e7404f906e346304b6113860ae811afc94a Reviewed-on: https://cl.tvl.fyi/c/depot/+/8631 Tested-by: BuildkiteCI Reviewed-by: tazjin Autosubmit: flokli --- tvix/store/src/store_io.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'tvix/store/src') diff --git a/tvix/store/src/store_io.rs b/tvix/store/src/store_io.rs index a7467362d334..ef18d9312868 100644 --- a/tvix/store/src/store_io.rs +++ b/tvix/store/src/store_io.rs @@ -65,7 +65,7 @@ impl Result, crate::Error> { @@ -106,7 +106,7 @@ impl Result { // Call [import::ingest_path], which will walk over the given path and return a root_node. @@ -191,7 +191,7 @@ impl< > EvalIO for TvixStoreIO { #[instrument(skip(self), ret, err)] - fn path_exists(&mut self, path: &Path) -> Result { + fn path_exists(&self, path: &Path) -> Result { if let Ok((store_path, sub_path)) = StorePath::from_absolute_path_full(&path.to_string_lossy()) { @@ -212,7 +212,7 @@ impl< } #[instrument(skip(self), ret, err)] - fn read_to_string(&mut self, path: &Path) -> Result { + fn read_to_string(&self, path: &Path) -> Result { if let Ok((store_path, sub_path)) = StorePath::from_absolute_path_full(&path.to_string_lossy()) { @@ -275,7 +275,7 @@ impl< } #[instrument(skip(self), ret, err)] - fn read_dir(&mut self, path: &Path) -> Result, io::Error> { + fn read_dir(&self, path: &Path) -> Result, io::Error> { if let Ok((store_path, sub_path)) = StorePath::from_absolute_path_full(&path.to_string_lossy()) { @@ -344,7 +344,7 @@ impl< } #[instrument(skip(self), ret, err)] - fn import_path(&mut self, path: &std::path::Path) -> Result { + fn import_path(&self, path: &std::path::Path) -> Result { let path_info = self.import_path_with_pathinfo(path)?; // from the [PathInfo], extract the store path (as string). -- cgit 1.4.1