From: Wolfgang Bumiller <w.bumiller@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH perl-rs 5/5] apt: minor parameter cleanup
Date: Tue, 9 Jul 2024 08:20:26 +0200 [thread overview]
Message-ID: <20240709062026.53271-5-w.bumiller@proxmox.com> (raw)
In-Reply-To: <20240709062026.53271-1-w.bumiller@proxmox.com>
We cannot use &[&str] - since this would be a poitner to a `[&str]`
data structure, that's not how perl stores strings.
But we *can* use Vec<&str> - here, the Vec will be allocated, but the
contents will borrow. We don't need to transform this afterwards.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
---
common/src/apt/repositories.rs | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/common/src/apt/repositories.rs b/common/src/apt/repositories.rs
index 8ad29cc..aff3522 100644
--- a/common/src/apt/repositories.rs
+++ b/common/src/apt/repositories.rs
@@ -77,9 +77,8 @@ pub mod export {
product_virtual_package: &str,
api_server_package: &str,
running_api_server_version: &str,
- package_list: Vec<String>,
+ package_list: Vec<&str>,
) -> Result<Vec<APTUpdateInfo>, Error> {
- let package_list: Vec<&str> = package_list.iter().map(|s| s.as_ref()).collect();
proxmox_apt::get_package_versions(
product_virtual_package,
api_server_package,
--
2.39.2
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
prev parent reply other threads:[~2024-07-09 6:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-09 6:20 [pve-devel] applied-series: [PATCH perl-rs 1/5] perl-rs: use proxmox-apt-api-types Wolfgang Bumiller
2024-07-09 6:20 ` [pve-devel] [PATCH perl-rs 2/5] perl-rs: use api functions from proxmox-apt Wolfgang Bumiller
2024-07-09 6:20 ` [pve-devel] [PATCH perl-rs 3/5] perl-rs: add further apt api calls Wolfgang Bumiller
2024-07-09 6:20 ` [pve-devel] [PATCH perl-rs 4/5] pve-rs: common: send apt update notification via proxmox-notify Wolfgang Bumiller
2024-07-09 6:20 ` Wolfgang Bumiller [this message]
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=20240709062026.53271-5-w.bumiller@proxmox.com \
--to=w.bumiller@proxmox.com \
--cc=pve-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.