From: Dietmar Maurer <dietmar@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH proxmox 2/2] apt: updates for changed api (digest as array)
Date: Wed, 17 Jul 2024 09:35:31 +0200 [thread overview]
Message-ID: <20240717073531.68480-2-dietmar@proxmox.com> (raw)
In-Reply-To: <20240717073531.68480-1-dietmar@proxmox.com>
Signed-off-by: Dietmar Maurer <dietmar@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
_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel
next prev parent reply other threads:[~2024-07-17 7:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-17 7:35 [pbs-devel] [PATCH proxmox 1/2] apt-api-types: fix backward compatibility by encoding digest as array Dietmar Maurer
2024-07-17 7:35 ` Dietmar Maurer [this message]
2024-07-17 9:48 ` [pbs-devel] applied-series: " Thomas Lamprecht
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240717073531.68480-2-dietmar@proxmox.com \
--to=dietmar@proxmox.com \
--cc=pbs-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.