diff --git a/proxmox-backup-client/src/main.rs b/proxmox-backup-client/src/main.rs index 0a2fc267..26a07b1c 100644 --- a/proxmox-backup-client/src/main.rs +++ b/proxmox-backup-client/src/main.rs @@ -193,13 +193,15 @@ pub async fn dir_or_last_from_group( } } +type Catalog = CatalogWriter>>; + async fn backup_directory>( client: &BackupWriter, dir_path: P, archive_name: &BackupArchiveName, payload_target: Option<&BackupArchiveName>, chunk_size: Option, - catalog: Option>>>>>, + catalog: Option>>, pxar_create_options: pbs_client::pxar::PxarCreateOptions, upload_options: UploadOptions, ) -> Result<(BackupStats, Option), Error> { diff --git a/proxmox-restore-daemon/src/proxmox_restore_daemon/auth.rs b/proxmox-restore-daemon/src/proxmox_restore_daemon/auth.rs index 8cfc4f13..8173d48a 100644 --- a/proxmox-restore-daemon/src/proxmox_restore_daemon/auth.rs +++ b/proxmox-restore-daemon/src/proxmox_restore_daemon/auth.rs @@ -39,17 +39,15 @@ pub fn read_ticket() -> Result, Error> { Ok(ticket.into()) } -pub fn check_auth<'a>( - ticket: Arc, - headers: &'a HeaderMap, - _method: &'a Method, -) -> Pin< +type AuthFn<'a> = Pin< Box< dyn Future), AuthError>> + Send + 'a, >, -> { +>; + +pub fn check_auth<'a>(ticket: Arc, headers: &'a HeaderMap, _method: &'a Method) -> AuthFn<'a> { Box::pin(async move { match headers.get(hyper::header::AUTHORIZATION) { Some(header) if header.to_str().unwrap_or("") == &*ticket => {