about summary refs log tree commit diff
path: root/tvix/store/src/pathinfoservice
diff options
context:
space:
mode:
Diffstat (limited to 'tvix/store/src/pathinfoservice')
-rw-r--r--tvix/store/src/pathinfoservice/from_addr.rs2
-rw-r--r--tvix/store/src/pathinfoservice/sled.rs6
2 files changed, 4 insertions, 4 deletions
diff --git a/tvix/store/src/pathinfoservice/from_addr.rs b/tvix/store/src/pathinfoservice/from_addr.rs
index 1505b3e427ee..35f2bd3730e3 100644
--- a/tvix/store/src/pathinfoservice/from_addr.rs
+++ b/tvix/store/src/pathinfoservice/from_addr.rs
@@ -63,7 +63,7 @@ pub async fn from_addr(
             ));
         }
         return Ok(Arc::new(
-            SledPathInfoService::new(url.path().into(), blob_service, directory_service)
+            SledPathInfoService::new(url.path(), blob_service, directory_service)
                 .map_err(|e| Error::StorageError(e.to_string()))?,
         ));
     } else if url.scheme() == "nix+http" || url.scheme() == "nix+https" {
diff --git a/tvix/store/src/pathinfoservice/sled.rs b/tvix/store/src/pathinfoservice/sled.rs
index 1382c3c29bfd..ff5ebee476b2 100644
--- a/tvix/store/src/pathinfoservice/sled.rs
+++ b/tvix/store/src/pathinfoservice/sled.rs
@@ -3,7 +3,7 @@ use crate::nar::calculate_size_and_sha256;
 use crate::proto::PathInfo;
 use futures::{stream::iter, Stream};
 use prost::Message;
-use std::{path::PathBuf, pin::Pin, sync::Arc};
+use std::{path::Path, pin::Pin, sync::Arc};
 use tonic::async_trait;
 use tracing::warn;
 use tvix_castore::proto as castorepb;
@@ -21,8 +21,8 @@ pub struct SledPathInfoService {
 }
 
 impl SledPathInfoService {
-    pub fn new(
-        p: PathBuf,
+    pub fn new<P: AsRef<Path>>(
+        p: P,
         blob_service: Arc<dyn BlobService>,
         directory_service: Arc<dyn DirectoryService>,
     ) -> Result<Self, sled::Error> {