mirror of
https://git.proxmox.com/git/proxmox-backup
synced 2025-04-28 05:44:39 +00:00
fix the type_complexity clippy lint
Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
This commit is contained in:
parent
5117a21ec9
commit
cdc2b341b6
@ -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>>(
|
||||
client: &BackupWriter,
|
||||
dir_path: P,
|
||||
archive_name: &BackupArchiveName,
|
||||
payload_target: Option<&BackupArchiveName>,
|
||||
chunk_size: Option<usize>,
|
||||
catalog: Option<Arc<Mutex<CatalogWriter<TokioWriterAdapter<StdChannelWriter<Error>>>>>>,
|
||||
catalog: Option<Arc<Mutex<Catalog>>>,
|
||||
pxar_create_options: pbs_client::pxar::PxarCreateOptions,
|
||||
upload_options: UploadOptions,
|
||||
) -> Result<(BackupStats, Option<BackupStats>), Error> {
|
||||
|
@ -39,17 +39,15 @@ pub fn read_ticket() -> Result<Arc<str>, Error> {
|
||||
Ok(ticket.into())
|
||||
}
|
||||
|
||||
pub fn check_auth<'a>(
|
||||
ticket: Arc<str>,
|
||||
headers: &'a HeaderMap,
|
||||
_method: &'a Method,
|
||||
) -> Pin<
|
||||
type AuthFn<'a> = Pin<
|
||||
Box<
|
||||
dyn Future<Output = Result<(String, Box<dyn UserInformation + Sync + Send>), AuthError>>
|
||||
+ Send
|
||||
+ 'a,
|
||||
>,
|
||||
> {
|
||||
>;
|
||||
|
||||
pub fn check_auth<'a>(ticket: Arc<str>, 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 => {
|
||||
|
Loading…
Reference in New Issue
Block a user