about summary refs log tree commit diff
path: root/tvix/store/src/store_io.rs
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2023-05-25T05·34+0300
committerclbot <clbot@tvl.fyi>2023-05-25T11·11+0000
commitd25962b9a4d175faaf4ea9e08062036c0a3e0236 (patch)
tree8803d9ded12f0f4caf607e06e7b1d7f1b7d3bd0b /tvix/store/src/store_io.rs
parentea48481eb39ded96fbaeef5d8e25771197eedda2 (diff)
refactor(tvix/eval): stop borrowing &mut self r/6202
This does undo cl/8571.

Change-Id: Ib14b4e7404f906e346304b6113860ae811afc94a
Reviewed-on: https://cl.tvl.fyi/c/depot/+/8631
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
Autosubmit: flokli <flokli@flokli.de>
Diffstat (limited to 'tvix/store/src/store_io.rs')
-rw-r--r--tvix/store/src/store_io.rs12
1 files changed, 6 insertions, 6 deletions
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<BS: BlobService, DS: DirectoryService, PS: PathInfoService, NCS: NARCalcula
     /// return the [crate::proto::node::Node] specified by `sub_path`.
     #[instrument(skip(self), ret, err)]
     fn store_path_to_root_node(
-        &mut self,
+        &self,
         store_path: &StorePath,
         sub_path: &Path,
     ) -> Result<Option<crate::proto::node::Node>, crate::Error> {
@@ -106,7 +106,7 @@ impl<BS: BlobService, DS: DirectoryService, PS: PathInfoService, NCS: NARCalcula
     /// care about the [PathInfo].
     #[instrument(skip(self), ret, err)]
     pub fn import_path_with_pathinfo(
-        &mut self,
+        &self,
         path: &std::path::Path,
     ) -> Result<crate::proto::PathInfo, io::Error> {
         // Call [import::ingest_path], which will walk over the given path and return a root_node.
@@ -191,7 +191,7 @@ impl<
     > EvalIO for TvixStoreIO<BS, DS, PS, NCS>
 {
     #[instrument(skip(self), ret, err)]
-    fn path_exists(&mut self, path: &Path) -> Result<bool, io::Error> {
+    fn path_exists(&self, path: &Path) -> Result<bool, io::Error> {
         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<String, io::Error> {
+    fn read_to_string(&self, path: &Path) -> Result<String, io::Error> {
         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<Vec<(SmolStr, FileType)>, io::Error> {
+    fn read_dir(&self, path: &Path) -> Result<Vec<(SmolStr, FileType)>, 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<PathBuf, std::io::Error> {
+    fn import_path(&self, path: &std::path::Path) -> Result<PathBuf, std::io::Error> {
         let path_info = self.import_path_with_pathinfo(path)?;
 
         // from the [PathInfo], extract the store path (as string).