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:
parent
36f2b69de5
commit
7f7c1ae7be
6 changed files with 27 additions and 21 deletions
|
|
@ -74,7 +74,7 @@ impl PathInfoService for MemoryPathInfoService {
|
|||
// This overwrites existing PathInfo objects.
|
||||
Ok(nix_path) => {
|
||||
let mut db = self.db.write().unwrap();
|
||||
db.insert(nix_path.digest, path_info.clone());
|
||||
db.insert(*nix_path.digest(), path_info.clone());
|
||||
|
||||
Ok(path_info)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -119,7 +119,10 @@ impl PathInfoService for SledPathInfoService {
|
|||
))),
|
||||
// In case the PathInfo is valid, and we were able to extract a NixPath, store it in the database.
|
||||
// This overwrites existing PathInfo objects.
|
||||
Ok(nix_path) => match self.db.insert(nix_path.digest, path_info.encode_to_vec()) {
|
||||
Ok(nix_path) => match self
|
||||
.db
|
||||
.insert(*nix_path.digest(), path_info.encode_to_vec())
|
||||
{
|
||||
Ok(_) => Ok(path_info),
|
||||
Err(e) => {
|
||||
warn!("failed to insert PathInfo: {}", e);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue