Skip to content

Commit f492337

Browse files
committed
fix: resolve clippy too_many_arguments warnings in connectivity modules
- Add ConnectivityOperationParams struct to group common parameters - Refactor all VPC Peering, PSC, and TGW functions to use the new struct - Update all function call sites to use the parameter struct - Remove unused AsyncOperationArgs imports - Reduces function parameters from 8-10 down to 2-4 arguments
1 parent 2b8c0b2 commit f492337

File tree

4 files changed

+351
-497
lines changed

4 files changed

+351
-497
lines changed

crates/redisctl/src/commands/cloud/connectivity/mod.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,21 @@ pub mod tgw;
77
pub mod vpc_peering;
88

99
use crate::cli::{CloudConnectivityCommands, OutputFormat};
10+
use crate::commands::cloud::async_utils::AsyncOperationArgs;
1011
use crate::connection::ConnectionManager;
1112
use crate::error::Result as CliResult;
13+
use redis_cloud::CloudClient;
14+
15+
/// Common parameters for connectivity operations
16+
pub struct ConnectivityOperationParams<'a> {
17+
pub conn_mgr: &'a ConnectionManager,
18+
pub profile_name: Option<&'a str>,
19+
pub client: &'a CloudClient,
20+
pub subscription_id: i32,
21+
pub async_ops: &'a AsyncOperationArgs,
22+
pub output_format: OutputFormat,
23+
pub query: Option<&'a str>,
24+
}
1225

1326
/// Handle connectivity commands
1427
pub async fn handle_connectivity_command(

0 commit comments

Comments
 (0)