[pbs-devel] [PATCH proxmox 2/2] apt: updates for changed api (digest as array)
Dietmar Maurer
dietmar at proxmox.com
Wed Jul 17 09:35:31 CEST 2024
Signed-off-by: Dietmar Maurer <dietmar at proxmox.com>
---
proxmox-apt/src/repositories/file.rs | 4 ++--
proxmox-apt/tests/repositories.rs | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/proxmox-apt/src/repositories/file.rs b/proxmox-apt/src/repositories/file.rs
index 078f6407..f176ab71 100644
--- a/proxmox-apt/src/repositories/file.rs
+++ b/proxmox-apt/src/repositories/file.rs
@@ -200,7 +200,7 @@ impl APTRepositoryFileImpl for APTRepositoryFile {
}
self.repositories = repos;
- self.digest = Some(digest);
+ self.digest = Some(*digest);
Ok(())
}
@@ -221,7 +221,7 @@ impl APTRepositoryFileImpl for APTRepositoryFile {
}
let (_, current_digest) = self.read_with_digest()?;
- if digest != ¤t_digest {
+ if *digest != *current_digest {
return Err(self.err(format_err!("digest mismatch")));
}
}
diff --git a/proxmox-apt/tests/repositories.rs b/proxmox-apt/tests/repositories.rs
index e4efcab6..5211a360 100644
--- a/proxmox-apt/tests/repositories.rs
+++ b/proxmox-apt/tests/repositories.rs
@@ -137,7 +137,7 @@ fn test_digest() -> Result<(), Error> {
// expect a different digest, because the repo was modified
let (_, new_digest) = file.read_with_digest()?;
- assert_ne!(old_digest, new_digest);
+ assert_ne!(old_digest, *new_digest);
assert!(file.write().is_err());
--
2.39.2
More information about the pbs-devel
mailing list