refactor(nix-compat/store_path): make digest and name private

Change-Id: I62cbe883afcf3dd0c8d4de0e3b845069eb750c97
Reviewed-on: https://cl.tvl.fyi/c/depot/+/9855
Reviewed-by: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
This commit is contained in:
edef 2023-10-27 11:35:09 +00:00
parent 36f2b69de5
commit 7f7c1ae7be
6 changed files with 27 additions and 21 deletions

View file

@ -61,10 +61,10 @@ impl TvixStoreIO {
sub_path: &Path,
) -> Result<Option<Node>, io::Error> {
let path_info_service = self.path_info_service.clone();
let digest = store_path.digest;
let task = self
.tokio_handle
.spawn(async move { path_info_service.get(digest).await });
let task = self.tokio_handle.spawn({
let digest = *store_path.digest();
async move { path_info_service.get(digest).await }
});
let path_info = match self.tokio_handle.block_on(task).unwrap()? {
// If there's no PathInfo found, early exit
None => return Ok(None),