accept a ref to a HttpClient

... since the functions don't actually need to own the value.

Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
Reviewed-by: Lukas Wagner <l.wagner@proxmox.com>
Tested-by: Lukas Wagner <l.wagner@proxmox.com>
Tested-by: Tested-by: Gabriel Goller <g.goller@proxmox.com>
This commit is contained in:
Hannes Laimer 2023-11-21 15:31:50 +01:00 committed by Thomas Lamprecht
parent 8f49d60330
commit 09683f1290
8 changed files with 10 additions and 10 deletions

View File

@ -34,7 +34,7 @@ async fn run() -> Result<(), Error> {
let backup_time = proxmox_time::parse_rfc3339("2019-06-28T10:49:48Z")?;
let client = BackupReader::start(
client,
&client,
None,
"store2",
&BackupNamespace::root(),

View File

@ -44,7 +44,7 @@ impl BackupReader {
/// Create a new instance by upgrading the connection at '/api2/json/reader'
pub async fn start(
client: HttpClient,
client: &HttpClient,
crypt_config: Option<Arc<CryptConfig>>,
datastore: &str,
ns: &BackupNamespace,

View File

@ -75,7 +75,7 @@ async fn dump_catalog(param: Value) -> Result<Value, Error> {
let client = connect(&repo)?;
let client = BackupReader::start(
client,
&client,
crypt_config.clone(),
repo.store(),
&backup_ns,
@ -187,7 +187,7 @@ async fn catalog_shell(param: Value) -> Result<(), Error> {
};
let client = BackupReader::start(
client,
&client,
crypt_config.clone(),
repo.store(),
&backup_ns,

View File

@ -1313,7 +1313,7 @@ async fn restore(
};
let client = BackupReader::start(
client,
&client,
crypt_config.clone(),
repo.store(),
&ns,

View File

@ -234,7 +234,7 @@ async fn mount_do(param: Value, pipe: Option<OwnedFd>) -> Result<Value, Error> {
};
let client = BackupReader::start(
client,
&client,
crypt_config.clone(),
repo.store(),
&backup_ns,

View File

@ -107,7 +107,7 @@ async fn list_files(
) -> Result<Vec<ArchiveEntry>, Error> {
let client = connect(&repo)?;
let client = BackupReader::start(
client,
&client,
crypt_config.clone(),
repo.store(),
&namespace,
@ -430,7 +430,7 @@ async fn extract(
let client = connect(&repo)?;
let client = BackupReader::start(
client,
&client,
crypt_config.clone(),
repo.store(),
&namespace,

View File

@ -294,7 +294,7 @@ async fn create_backup_reader(
};
let client = connect(&params.repo)?;
let backup_reader = BackupReader::start(
client,
&client,
params.crypt_config.clone(),
params.repo.store(),
&params.namespace,

View File

@ -738,7 +738,7 @@ async fn pull_group(
)?;
let reader = BackupReader::start(
new_client,
&new_client,
None,
params.source.store(),
&remote_ns,