diff options
author | Florian Klink <flokli@flokli.de> | 2023-12-11T20·11+0200 |
---|---|---|
committer | clbot <clbot@tvl.fyi> | 2023-12-11T22·46+0000 |
commit | ccaf10b4a6f7768294e41fcb6fbcd768a1e1c143 (patch) | |
tree | 64e7ee1f57474e04d8854ed85f5255a6f8af99ea /tvix/castore/src/directoryservice/from_addr.rs | |
parent | 9748543f1c3edd88e8b05f6a772d6e9be18a7be9 (diff) |
refactor(tvix/*store/sled): make ::new() more generic r/7159
We don't really require the Path to be a PathBuf, we don't even require it to be a Path, we only need it to be AsRef<Path>>. This removes some conversion in the from_addr cases, which can just reuse `url.path()` (a `&str`). Change-Id: I38d536dbaf0b44421e41f211a9ad2b13605179e9 Reviewed-on: https://cl.tvl.fyi/c/depot/+/10258 Autosubmit: flokli <flokli@flokli.de> Reviewed-by: raitobezarius <tvl@lahfa.xyz> Tested-by: BuildkiteCI
Diffstat (limited to 'tvix/castore/src/directoryservice/from_addr.rs')
-rw-r--r-- | tvix/castore/src/directoryservice/from_addr.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tvix/castore/src/directoryservice/from_addr.rs b/tvix/castore/src/directoryservice/from_addr.rs index 8f79fa6158cc..bd1bf584cf29 100644 --- a/tvix/castore/src/directoryservice/from_addr.rs +++ b/tvix/castore/src/directoryservice/from_addr.rs @@ -51,7 +51,7 @@ pub async fn from_addr(uri: &str) -> Result<Arc<dyn DirectoryService>, crate::Er )); } return Ok(Arc::new( - SledDirectoryService::new(url.path().into()) + SledDirectoryService::new(url.path()) .map_err(|e| Error::StorageError(e.to_string()))?, )); } else if url.scheme().starts_with("grpc+") { |