about summary refs log tree commit diff
path: root/tvix/store
diff options
context:
space:
mode:
Diffstat (limited to 'tvix/store')
-rw-r--r--tvix/store/src/fuse/mod.rs3
-rw-r--r--tvix/store/src/proto/mod.rs3
-rw-r--r--tvix/store/src/proto/tests/pathinfo.rs7
3 files changed, 8 insertions, 5 deletions
diff --git a/tvix/store/src/fuse/mod.rs b/tvix/store/src/fuse/mod.rs
index a357890f59..8aa49c4997 100644
--- a/tvix/store/src/fuse/mod.rs
+++ b/tvix/store/src/fuse/mod.rs
@@ -19,6 +19,7 @@ use crate::{
 use fuser::{FileAttr, ReplyAttr, Request};
 use nix_compat::store_path::StorePath;
 use std::io::Read;
+use std::str::FromStr;
 use std::sync::Arc;
 use std::{collections::HashMap, time::Duration};
 use tracing::{debug, info_span, warn};
@@ -99,7 +100,7 @@ impl FUSE {
     ) -> Result<Option<(u64, Arc<InodeData>)>, Error> {
         // parse the name into a [StorePath].
         let store_path = if let Some(name) = name.to_str() {
-            match StorePath::from_string(name) {
+            match StorePath::from_str(name) {
                 Ok(store_path) => store_path,
                 Err(e) => {
                     debug!(e=?e, "unable to parse as store path");
diff --git a/tvix/store/src/proto/mod.rs b/tvix/store/src/proto/mod.rs
index 4db0b9731e..7e69726632 100644
--- a/tvix/store/src/proto/mod.rs
+++ b/tvix/store/src/proto/mod.rs
@@ -1,5 +1,6 @@
 #![allow(clippy::derive_partial_eq_without_eq)]
 // https://github.com/hyperium/tonic/issues/1056
+use std::str::FromStr;
 use std::{collections::HashSet, iter::Peekable};
 use thiserror::Error;
 
@@ -97,7 +98,7 @@ fn parse_node_name_root<E>(
     name: &str,
     err: fn(String, store_path::Error) -> E,
 ) -> Result<StorePath, E> {
-    match StorePath::from_string(name) {
+    match StorePath::from_str(name) {
         Ok(np) => Ok(np),
         Err(e) => Err(err(name.to_string(), e)),
     }
diff --git a/tvix/store/src/proto/tests/pathinfo.rs b/tvix/store/src/proto/tests/pathinfo.rs
index 57104a5fda..bccec539f9 100644
--- a/tvix/store/src/proto/tests/pathinfo.rs
+++ b/tvix/store/src/proto/tests/pathinfo.rs
@@ -1,6 +1,7 @@
 use crate::proto::{self, Node, PathInfo, ValidatePathInfoError};
 use lazy_static::lazy_static;
 use nix_compat::store_path::{self, StorePath};
+use std::str::FromStr;
 use test_case::test_case;
 
 lazy_static! {
@@ -46,7 +47,7 @@ fn validate_no_node(
         digest: DUMMY_DIGEST.to_vec(),
         size: 0,
     },
-    Ok(StorePath::from_string(DUMMY_NAME).expect("must succeed"));
+    Ok(StorePath::from_str(DUMMY_NAME).expect("must succeed"));
     "ok"
 )]
 #[test_case(
@@ -91,7 +92,7 @@ fn validate_directory(
         size: 0,
         executable: false,
     },
-    Ok(StorePath::from_string(DUMMY_NAME).expect("must succeed"));
+    Ok(StorePath::from_str(DUMMY_NAME).expect("must succeed"));
     "ok"
 )]
 #[test_case(
@@ -131,7 +132,7 @@ fn validate_file(t_file_node: proto::FileNode, t_result: Result<StorePath, Valid
         name: DUMMY_NAME.to_string(),
         ..Default::default()
     },
-    Ok(StorePath::from_string(DUMMY_NAME).expect("must succeed"));
+    Ok(StorePath::from_str(DUMMY_NAME).expect("must succeed"));
     "ok"
 )]
 #[test_case(