From b3b8b375c277c7fc6ae839d3f26c10eb9673e1c6 Mon Sep 17 00:00:00 2001 From: Wolfgang Bumiller Date: Mon, 8 Jul 2024 14:06:26 +0200 Subject: [PATCH] apt: minor parameter cleanup 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 --- 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, + package_list: Vec<&str>, ) -> Result, 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,