fix the type_complexity clippy lint

Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
This commit is contained in:
Maximiliano Sandoval 2025-03-06 14:12:32 +01:00 committed by Wolfgang Bumiller
parent 5117a21ec9
commit cdc2b341b6
2 changed files with 7 additions and 7 deletions

View File

@ -193,13 +193,15 @@ pub async fn dir_or_last_from_group(
} }
} }
type Catalog = CatalogWriter<TokioWriterAdapter<StdChannelWriter<Error>>>;
async fn backup_directory<P: AsRef<Path>>( async fn backup_directory<P: AsRef<Path>>(
client: &BackupWriter, client: &BackupWriter,
dir_path: P, dir_path: P,
archive_name: &BackupArchiveName, archive_name: &BackupArchiveName,
payload_target: Option<&BackupArchiveName>, payload_target: Option<&BackupArchiveName>,
chunk_size: Option<usize>, chunk_size: Option<usize>,
catalog: Option<Arc<Mutex<CatalogWriter<TokioWriterAdapter<StdChannelWriter<Error>>>>>>, catalog: Option<Arc<Mutex<Catalog>>>,
pxar_create_options: pbs_client::pxar::PxarCreateOptions, pxar_create_options: pbs_client::pxar::PxarCreateOptions,
upload_options: UploadOptions, upload_options: UploadOptions,
) -> Result<(BackupStats, Option<BackupStats>), Error> { ) -> Result<(BackupStats, Option<BackupStats>), Error> {

View File

@ -39,17 +39,15 @@ pub fn read_ticket() -> Result<Arc<str>, Error> {
Ok(ticket.into()) Ok(ticket.into())
} }
pub fn check_auth<'a>( type AuthFn<'a> = Pin<
ticket: Arc<str>,
headers: &'a HeaderMap,
_method: &'a Method,
) -> Pin<
Box< Box<
dyn Future<Output = Result<(String, Box<dyn UserInformation + Sync + Send>), AuthError>> dyn Future<Output = Result<(String, Box<dyn UserInformation + Sync + Send>), AuthError>>
+ Send + Send
+ 'a, + 'a,
>, >,
> { >;
pub fn check_auth<'a>(ticket: Arc<str>, headers: &'a HeaderMap, _method: &'a Method) -> AuthFn<'a> {
Box::pin(async move { Box::pin(async move {
match headers.get(hyper::header::AUTHORIZATION) { match headers.get(hyper::header::AUTHORIZATION) {
Some(header) if header.to_str().unwrap_or("") == &*ticket => { Some(header) if header.to_str().unwrap_or("") == &*ticket => {