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 <w.bumiller@proxmox.com>
This commit is contained in:
Wolfgang Bumiller 2024-07-08 14:06:26 +02:00
parent 6789b14986
commit b3b8b375c2

View File

@ -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,