rustc:native <!nocheck>,
libstd-rust-dev <!nocheck>,
librust-anyhow-1+default-dev <!nocheck>,
+ librust-hex-0.4+default-dev (>= 0.4.3-~~) <!nocheck>,
librust-once-cell-1+default-dev (>= 1.3.1-~~) <!nocheck>,
librust-openssl-0.10+default-dev <!nocheck>,
- librust-proxmox-0.13+api-macro-dev <!nocheck>,
+ librust-proxmox-schema-1+api-macro-dev <!nocheck>,
+ librust-proxmox-schema-1+default-dev <!nocheck>,
librust-serde-1+default-dev <!nocheck>,
librust-serde-1+derive-dev <!nocheck>
Maintainer: Proxmox Support Team <support@proxmox.com>
Depends:
${misc:Depends},
librust-anyhow-1+default-dev,
+ librust-hex-0.4+default-dev (>= 0.4.3-~~),
librust-once-cell-1+default-dev (>= 1.3.1-~~),
librust-openssl-0.10+default-dev,
- librust-proxmox-0.13+api-macro-dev,
+ librust-proxmox-schema-1+api-macro-dev,
+ librust-proxmox-schema-1+default-dev,
librust-serde-1+default-dev,
librust-serde-1+derive-dev
Provides:
librust-proxmox-apt+default-dev (= ${binary:Version}),
librust-proxmox-apt-0-dev (= ${binary:Version}),
librust-proxmox-apt-0+default-dev (= ${binary:Version}),
- librust-proxmox-apt-0.7-dev (= ${binary:Version}),
- librust-proxmox-apt-0.7+default-dev (= ${binary:Version}),
- librust-proxmox-apt-0.7.0-dev (= ${binary:Version}),
- librust-proxmox-apt-0.7.0+default-dev (= ${binary:Version})
+ librust-proxmox-apt-0.8-dev (= ${binary:Version}),
+ librust-proxmox-apt-0.8+default-dev (= ${binary:Version}),
+ librust-proxmox-apt-0.8.0-dev (= ${binary:Version}),
+ librust-proxmox-apt-0.8.0+default-dev (= ${binary:Version})
Description: Proxmox library for APT - Rust source code
This package contains the source for the Rust proxmox-apt crate, packaged by
debcargo for use with cargo and dh-cargo.
use anyhow::{bail, format_err, Error};
use serde::{Deserialize, Serialize};
-use proxmox::api::api;
+use proxmox_schema::api;
use crate::repositories::standard::APTRepositoryHandle;
for b in filename.as_bytes().iter() {
if *b <= 0x20 || *b >= 0x7F || encode_chars.contains(*b as char) {
- let hex = proxmox::tools::bin_to_hex(&[*b]);
+ let mut hex = [0u8; 2];
+ // unwrap: we're hex-encoding a single byte into a 2-byte slice
+ hex::encode_to_slice(&[*b], &mut hex).unwrap();
+ let hex = unsafe { std::str::from_utf8_unchecked(&hex) };
encoded = format!("{}%{}", encoded, hex);
} else {
encoded.push(*b as char);