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 5D8266AF92 for ; Mon, 25 Jan 2021 14:43:57 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 5BA7DB233 for ; Mon, 25 Jan 2021 14:43:57 +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 ADD0BB0F1 for ; Mon, 25 Jan 2021 14:43:53 +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 7CA4745717 for ; Mon, 25 Jan 2021 14:43:53 +0100 (CET) From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= To: pbs-devel@lists.proxmox.com Date: Mon, 25 Jan 2021 14:42:59 +0100 Message-Id: <20210125134302.3394328-15-f.gruenbichler@proxmox.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210125134302.3394328-1-f.gruenbichler@proxmox.com> References: <20210125134302.3394328-1-f.gruenbichler@proxmox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.025 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 14/15] clippy: allow api functions with many arguments 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:57 -0000 some of those can be reduced/cleaned up when we have updater support in the api macro. Signed-off-by: Fabian Grünbichler --- src/api2/access/acl.rs | 1 + src/api2/access/tfa.rs | 1 + src/api2/access/user.rs | 1 + src/api2/admin/datastore.rs | 2 -- src/api2/config/datastore.rs | 1 + src/api2/config/remote.rs | 1 + 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/bin/pxar.rs | 1 + src/client/backup_writer.rs | 2 ++ 12 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/api2/access/acl.rs b/src/api2/access/acl.rs index 6f1ba327..be9ad380 100644 --- a/src/api2/access/acl.rs +++ b/src/api2/access/acl.rs @@ -165,6 +165,7 @@ pub fn read_acl( }, )] /// Update Access Control List (ACLs). +#[allow(clippy::too_many_arguments)] pub fn update_acl( path: String, role: String, diff --git a/src/api2/access/tfa.rs b/src/api2/access/tfa.rs index 5df0baec..ba583323 100644 --- a/src/api2/access/tfa.rs +++ b/src/api2/access/tfa.rs @@ -421,6 +421,7 @@ impl TfaUpdateInfo { }, )] /// Add a TFA entry to the user. +#[allow(clippy::too_many_arguments)] fn add_tfa_entry( userid: Userid, description: Option, diff --git a/src/api2/access/user.rs b/src/api2/access/user.rs index c6032818..c49b12b1 100644 --- a/src/api2/access/user.rs +++ b/src/api2/access/user.rs @@ -353,6 +353,7 @@ pub enum DeletableProperty { }, )] /// Update user configuration. +#[allow(clippy::too_many_arguments)] pub fn update_user( userid: Userid, comment: Option, diff --git a/src/api2/admin/datastore.rs b/src/api2/admin/datastore.rs index 3d5b6af6..6f02e460 100644 --- a/src/api2/admin/datastore.rs +++ b/src/api2/admin/datastore.rs @@ -1293,8 +1293,6 @@ pub fn catalog( backup_id: String, backup_time: i64, filepath: String, - _param: Value, - _info: &ApiMethod, rpcenv: &mut dyn RpcEnvironment, ) -> Result { let datastore = DataStore::lookup_datastore(&store)?; diff --git a/src/api2/config/datastore.rs b/src/api2/config/datastore.rs index 00009b74..3a3dc176 100644 --- a/src/api2/config/datastore.rs +++ b/src/api2/config/datastore.rs @@ -277,6 +277,7 @@ pub enum DeletableProperty { }, )] /// Update datastore config. +#[allow(clippy::too_many_arguments)] pub fn update_datastore( name: String, comment: Option, diff --git a/src/api2/config/remote.rs b/src/api2/config/remote.rs index 28221358..446a2604 100644 --- a/src/api2/config/remote.rs +++ b/src/api2/config/remote.rs @@ -203,6 +203,7 @@ pub enum DeletableProperty { }, )] /// Update remote configuration. +#[allow(clippy::too_many_arguments)] pub fn update_remote( name: String, comment: Option, diff --git a/src/api2/config/sync.rs b/src/api2/config/sync.rs index e7360051..00a8c0b3 100644 --- a/src/api2/config/sync.rs +++ b/src/api2/config/sync.rs @@ -279,6 +279,7 @@ pub enum DeletableProperty { }, )] /// Update sync job config. +#[allow(clippy::too_many_arguments)] pub fn update_sync_job( id: String, store: Option, diff --git a/src/api2/config/verify.rs b/src/api2/config/verify.rs index 08a9e717..db5f4d83 100644 --- a/src/api2/config/verify.rs +++ b/src/api2/config/verify.rs @@ -215,6 +215,7 @@ pub enum DeletableProperty { }, )] /// Update verification job config. +#[allow(clippy::too_many_arguments)] pub fn update_verification_job( id: String, store: Option, diff --git a/src/api2/node/network.rs b/src/api2/node/network.rs index d9c031ae..0dc321b8 100644 --- a/src/api2/node/network.rs +++ b/src/api2/node/network.rs @@ -213,6 +213,7 @@ pub fn read_interface(iface: String) -> Result { }, )] /// Create network interface configuration. +#[allow(clippy::too_many_arguments)] pub fn create_interface( iface: String, autostart: Option, @@ -477,6 +478,7 @@ pub enum DeletableProperty { }, )] /// Update network interface config. +#[allow(clippy::too_many_arguments)] pub fn update_interface( iface: String, autostart: Option, diff --git a/src/api2/node/tasks.rs b/src/api2/node/tasks.rs index 99470531..ff6ed726 100644 --- a/src/api2/node/tasks.rs +++ b/src/api2/node/tasks.rs @@ -425,6 +425,7 @@ fn stop_task( }, )] /// List tasks. +#[allow(clippy::too_many_arguments)] pub fn list_tasks( start: u64, limit: u64, diff --git a/src/bin/pxar.rs b/src/bin/pxar.rs index b2fe6d52..814b3346 100644 --- a/src/bin/pxar.rs +++ b/src/bin/pxar.rs @@ -112,6 +112,7 @@ fn extract_archive_from_reader( }, )] /// Extract an archive. +#[allow(clippy::too_many_arguments)] fn extract_archive( archive: String, pattern: Option>, diff --git a/src/client/backup_writer.rs b/src/client/backup_writer.rs index 38953a45..01ea7704 100644 --- a/src/client/backup_writer.rs +++ b/src/client/backup_writer.rs @@ -57,6 +57,8 @@ impl BackupWriter { Arc::new(Self { h2, abort, crypt_config, verbose }) } + // FIXME: extract into (flattened) parameter struct? + #[allow(clippy::too_many_arguments)] pub async fn start( client: HttpClient, crypt_config: Option>, -- 2.20.1