]> git.proxmox.com Git - proxmox-backup.git/commitdiff
clippy: allow api functions with many arguments
authorFabian Grünbichler <f.gruenbichler@proxmox.com>
Mon, 25 Jan 2021 13:42:59 +0000 (14:42 +0100)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Tue, 26 Jan 2021 08:54:52 +0000 (09:54 +0100)
some of those can be reduced/cleaned up when we have updater support in
the api macro.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
12 files changed:
src/api2/access/acl.rs
src/api2/access/tfa.rs
src/api2/access/user.rs
src/api2/admin/datastore.rs
src/api2/config/datastore.rs
src/api2/config/remote.rs
src/api2/config/sync.rs
src/api2/config/verify.rs
src/api2/node/network.rs
src/api2/node/tasks.rs
src/bin/pxar.rs
src/client/backup_writer.rs

index 6f1ba327387413bd00e6bb973101c68de7e1dd59..be9ad3805a134d1e914063741cafa2eae7dda2f3 100644 (file)
@@ -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,
index 5df0baec29a4ca06914713139ecefd347c9a0315..ba5833232afd1e10a8add5ff6c5bd90b5a0842fa 100644 (file)
@@ -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<String>,
index c6032818f0c098f183061e66fd275e8c72ea1a2c..c49b12b146e3ab38905ff2646ef4104f83e3dce9 100644 (file)
@@ -353,6 +353,7 @@ pub enum DeletableProperty {
     },
 )]
 /// Update user configuration.
+#[allow(clippy::too_many_arguments)]
 pub fn update_user(
     userid: Userid,
     comment: Option<String>,
index 3d5b6af6f21f2165334036eeeda6d2149707058f..6f02e46069940a8537280fdc944763c3e117d71e 100644 (file)
@@ -1293,8 +1293,6 @@ pub fn catalog(
     backup_id: String,
     backup_time: i64,
     filepath: String,
-    _param: Value,
-    _info: &ApiMethod,
     rpcenv: &mut dyn RpcEnvironment,
 ) -> Result<Value, Error> {
     let datastore = DataStore::lookup_datastore(&store)?;
index 00009b741f4855363c55cc19ea50427b79d30b3a..3a3dc17657e1d49ed212e1b4beb745d53c2b78a5 100644 (file)
@@ -277,6 +277,7 @@ pub enum DeletableProperty {
     },
 )]
 /// Update datastore config.
+#[allow(clippy::too_many_arguments)]
 pub fn update_datastore(
     name: String,
     comment: Option<String>,
index 282213581e5e59e0176404a774e3b446c8111b96..446a260413769e3db2e434a31471764efd2d4035 100644 (file)
@@ -203,6 +203,7 @@ pub enum DeletableProperty {
     },
 )]
 /// Update remote configuration.
+#[allow(clippy::too_many_arguments)]
 pub fn update_remote(
     name: String,
     comment: Option<String>,
index e7360051db018bf889e01a6136075a617841896d..00a8c0b317fb2f53f74013206cbf51b3bd80fcf1 100644 (file)
@@ -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<String>,
index 08a9e7172169ddb65f176022ff836c82c2ffc44b..db5f4d836cf4e18e151bcc1a414e4ac0ebaa93a9 100644 (file)
@@ -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<String>,
index d9c031aef080292db74a2b7f4bb93cccaef26d39..0dc321b867110878b3dabf40809e4bf439f94a7b 100644 (file)
@@ -213,6 +213,7 @@ pub fn read_interface(iface: String) -> Result<Value, Error> {
     },
 )]
 /// Create network interface configuration.
+#[allow(clippy::too_many_arguments)]
 pub fn create_interface(
     iface: String,
     autostart: Option<bool>,
@@ -477,6 +478,7 @@ pub enum DeletableProperty {
     },
 )]
 /// Update network interface config.
+#[allow(clippy::too_many_arguments)]
 pub fn update_interface(
     iface: String,
     autostart: Option<bool>,
index 994705316fed73546a7412b4fb2b77245f35c176..ff6ed72694bb66ff4e006ebd1b565f4c867b05a7 100644 (file)
@@ -425,6 +425,7 @@ fn stop_task(
     },
 )]
 /// List tasks.
+#[allow(clippy::too_many_arguments)]
 pub fn list_tasks(
     start: u64,
     limit: u64,
index b2fe6d52d72c983fbecac9f3ba51522d8b237077..814b3346a39b2c188f5b2d7791cf16fe9877cf9c 100644 (file)
@@ -112,6 +112,7 @@ fn extract_archive_from_reader<R: std::io::Read>(
     },
 )]
 /// Extract an archive.
+#[allow(clippy::too_many_arguments)]
 fn extract_archive(
     archive: String,
     pattern: Option<Vec<String>>,
index 38953a450a3ed20cd8d3007210c7a9dc68baf481..01ea7704fdee474249a5800f4963c068c766a1e5 100644 (file)
@@ -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<Arc<CryptConfig>>,