From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id EC1EE6AED2 for ; Mon, 25 Jan 2021 14:43:12 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id DF240AC77 for ; Mon, 25 Jan 2021 14:43:12 +0100 (CET) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [212.186.127.180]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS id 76F52AC61 for ; Mon, 25 Jan 2021 14:43:09 +0100 (CET) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 3A36F45717 for ; Mon, 25 Jan 2021 14:43:09 +0100 (CET) From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= To: pbs-devel@lists.proxmox.com Date: Mon, 25 Jan 2021 14:42:45 +0100 Message-Id: <20210125134302.3394328-1-f.gruenbichler@proxmox.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.026 Adjusted score from AWL reputation of From: address KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pbs-devel] [PATCH proxmox-backup(-qemu) 00/17] clippy refactorings X-BeenThere: pbs-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Backup Server development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jan 2021 13:43:13 -0000 various parameter/types refactorings to simplify function signatures/return types/... I am grateful for suggestions on better names ;) I tried to order/group the patches so that they also apply individually/as sub-groups. with all of these, we are now down to some very recently touched files with trivial fixes that I didn't want to change since I suspected them to be still under development, and one missing docs lint: warning: unsafe function's docs miss `# Safety` section --> src/tools/fs.rs:78:5 | 78 | / pub unsafe fn file_name_utf8_unchecked(&self) -> &str { 79 | | std::str::from_utf8_unchecked(self.file_name().to_bytes()) 80 | | } | |_____^ proxmox-backup: report: type-alias function call tuple broadcast_future: refactor broadcast/future binding client: refactor catalog upload spawning allow complex Futures in tower_service impl async index reader: typedef ReadFuture systemd/time: extract Time/DateSpec structs client: factor out UploadOptions pxar: typedef on_error as ErrorHandler pxar: factor out PxarCreateOptions pxar: extract PxarExtractOptions authid: make Tokenname(Ref) derive Eq derive/impl and use Default for some structs verify: factor out common parameters clippy: allow api functions with many arguments clippy: more misc fixes examples/download-speed.rs | 2 +- examples/upload-speed.rs | 2 +- src/api2/access/acl.rs | 1 + src/api2/access/tfa.rs | 1 + src/api2/access/user.rs | 1 + src/api2/admin/datastore.rs | 19 +-- src/api2/backup/environment.rs | 10 +- src/api2/config/datastore.rs | 1 + src/api2/config/remote.rs | 5 +- src/api2/config/sync.rs | 1 + src/api2/config/verify.rs | 1 + src/api2/node/network.rs | 2 + src/api2/node/tasks.rs | 1 + src/api2/types/userid.rs | 52 +------- src/backup/async_index_reader.rs | 4 +- src/backup/prune.rs | 1 + src/backup/verify.rs | 174 +++++++++++-------------- src/bin/proxmox-backup-client.rs | 162 +++++++++++++---------- src/bin/proxmox-daily-update.rs | 9 +- src/bin/proxmox_backup_client/key.rs | 24 +--- src/bin/proxmox_backup_client/mount.rs | 2 +- src/bin/proxmox_backup_manager/user.rs | 4 +- src/bin/pxar.rs | 54 ++++---- src/client.rs | 11 +- src/client/backup_writer.rs | 46 ++++--- src/client/http_client.rs | 38 ++++-- src/client/pull.rs | 4 +- src/client/pxar_backup_stream.rs | 28 +--- src/config/acl.rs | 8 +- src/config/network.rs | 2 +- src/pxar/create.rs | 28 +++- src/pxar/extract.rs | 24 ++-- src/pxar/mod.rs | 4 +- src/rrd/mod.rs | 1 + src/server/h2service.rs | 5 +- src/server/report.rs | 6 +- src/server/rest.rs | 3 +- src/server/verify_job.rs | 3 +- src/tools/broadcast_future.rs | 38 ++---- src/tools/http.rs | 5 +- src/tools/systemd/parse_time.rs | 41 ++++-- tests/catar.rs | 10 +- 42 files changed, 414 insertions(+), 424 deletions(-) proxmox-backup-qemu: use UploadOptions for uploading Blobs use new HttpClientOptions constructors src/backup.rs | 7 ++++--- src/commands.rs | 15 +++++++++++++-- src/lib.rs | 8 +++++--- src/restore.rs | 7 ++++--- 4 files changed, 26 insertions(+), 11 deletions(-) -- 2.20.1