From: Maximiliano Sandoval <m.sandoval@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH backup 5/8] fix the type_complexity clippy lint
Date: Thu, 6 Mar 2025 14:12:32 +0100 [thread overview]
Message-ID: <20250306131235.452521-5-m.sandoval@proxmox.com> (raw)
In-Reply-To: <20250306131235.452521-1-m.sandoval@proxmox.com>
Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
---
proxmox-backup-client/src/main.rs | 4 +++-
.../src/proxmox_restore_daemon/auth.rs | 10 ++++------
2 files changed, 7 insertions(+), 7 deletions(-)
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<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> {
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<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 => {
--
2.39.5
_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel
next prev parent reply other threads:[~2025-03-06 13:13 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-06 13:12 [pbs-devel] [PATCH backup 1/8] server: remove needless clone Maximiliano Sandoval
2025-03-06 13:12 ` [pbs-devel] [PATCH backup 2/8] run cargo clippy --fix Maximiliano Sandoval
2025-03-06 13:12 ` [pbs-devel] [PATCH backup 3/8] api: remove redundant guard Maximiliano Sandoval
2025-03-06 13:12 ` [pbs-devel] [PATCH backup 4/8] snapshot_reader: replace Arc with Rc Maximiliano Sandoval
2025-03-06 13:12 ` Maximiliano Sandoval [this message]
2025-03-06 13:12 ` [pbs-devel] [PATCH backup 6/8] create a CachedSchema struct Maximiliano Sandoval
2025-03-06 13:12 ` [pbs-devel] [PATCH backup 7/8] zfs: remove unnecessary arc from dataset object map Maximiliano Sandoval
2025-03-06 13:12 ` [pbs-devel] [PATCH backup 8/8] add too_many_arguments clippy exception Maximiliano Sandoval
2025-03-06 14:00 ` [pbs-devel] applied-series: [PATCH backup 1/8] server: remove needless clone Wolfgang Bumiller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250306131235.452521-5-m.sandoval@proxmox.com \
--to=m.sandoval@proxmox.com \
--cc=pbs-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal