diff --git a/examples/upload-speed.rs b/examples/upload-speed.rs index f9fc52a8..e4b570ec 100644 --- a/examples/upload-speed.rs +++ b/examples/upload-speed.rs @@ -18,7 +18,7 @@ async fn upload_speed() -> Result { let backup_time = proxmox_time::epoch_i64(); let client = BackupWriter::start( - client, + &client, None, datastore, &BackupNamespace::root(), diff --git a/pbs-client/src/backup_writer.rs b/pbs-client/src/backup_writer.rs index 8a03d8ea..8bd0e4f3 100644 --- a/pbs-client/src/backup_writer.rs +++ b/pbs-client/src/backup_writer.rs @@ -78,7 +78,7 @@ impl BackupWriter { // FIXME: extract into (flattened) parameter struct? #[allow(clippy::too_many_arguments)] pub async fn start( - client: HttpClient, + client: &HttpClient, crypt_config: Option>, datastore: &str, ns: &BackupNamespace, diff --git a/proxmox-backup-client/src/benchmark.rs b/proxmox-backup-client/src/benchmark.rs index b3047308..1262fb46 100644 --- a/proxmox-backup-client/src/benchmark.rs +++ b/proxmox-backup-client/src/benchmark.rs @@ -229,7 +229,7 @@ async fn test_upload_speed( log::debug!("Connecting to backup server"); let client = BackupWriter::start( - client, + &client, crypt_config.clone(), repo.store(), &BackupNamespace::root(), diff --git a/proxmox-backup-client/src/main.rs b/proxmox-backup-client/src/main.rs index 546275cb..14870897 100644 --- a/proxmox-backup-client/src/main.rs +++ b/proxmox-backup-client/src/main.rs @@ -834,7 +834,7 @@ async fn create_backup( let backup_time = backup_time_opt.unwrap_or_else(epoch_i64); - let client = connect_rate_limited(&repo, rate_limit)?; + let http_client = connect_rate_limited(&repo, rate_limit)?; record_repository(&repo); let snapshot = BackupDir::from((backup_type, backup_id.to_owned(), backup_time)); @@ -886,7 +886,7 @@ async fn create_backup( }; let client = BackupWriter::start( - client, + &http_client, crypt_config.clone(), repo.store(), &backup_ns,