From d53a13117b610d25c7c163031601ed7f29d0a842 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karolis=20Gudi=C5=A1kis?= Date: Fri, 6 Oct 2023 07:48:24 +0300 Subject: [PATCH] chore: Remove redundant variable assign (#2127) * chore: Remove redundant variable assign * fix other clippy warnings --- dozer-api/src/grpc/client_server.rs | 1 - dozer-ingestion/src/connectors/object_store/connector.rs | 1 - dozer-ingestion/src/connectors/snowflake/connection/client.rs | 4 ++-- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/dozer-api/src/grpc/client_server.rs b/dozer-api/src/grpc/client_server.rs index 66ab37aa5b..5cf666e3a4 100644 --- a/dozer-api/src/grpc/client_server.rs +++ b/dozer-api/src/grpc/client_server.rs @@ -143,7 +143,6 @@ impl ApiServer { } else { unauthenticated_reflection_service = Some(reflection_service); }; - let health_service = health_service; let mut auth_service = None; let security = get_api_security(self.security.to_owned()); diff --git a/dozer-ingestion/src/connectors/object_store/connector.rs b/dozer-ingestion/src/connectors/object_store/connector.rs index 9c481a93ec..557e5cbfc1 100644 --- a/dozer-ingestion/src/connectors/object_store/connector.rs +++ b/dozer-ingestion/src/connectors/object_store/connector.rs @@ -210,7 +210,6 @@ impl Connector for ObjectStoreConnector { joinset.spawn(async move { let mut csv_table = CsvTable::new(csv_config, config); csv_table.update_state = state; - let table_info = table_info; csv_table.watch(table_index, &table_info, sender).await?; Ok::<_, ConnectorError>(()) }); diff --git a/dozer-ingestion/src/connectors/snowflake/connection/client.rs b/dozer-ingestion/src/connectors/snowflake/connection/client.rs index 6c0dc0acf6..f3e72805c5 100644 --- a/dozer-ingestion/src/connectors/snowflake/connection/client.rs +++ b/dozer-ingestion/src/connectors/snowflake/connection/client.rs @@ -351,13 +351,13 @@ impl<'env> Client<'env> { .map(|(name, (_, schema))| match schema { Ok(mut schema) => { let mut indexes = vec![]; - keys.get(&name).map_or((), |columns| { + if let Some(columns) = keys.get(&name) { schema.fields.iter().enumerate().for_each(|(idx, f)| { if columns.contains(&f.name) { indexes.push(idx); } }); - }); + } let cdc_type = if indexes.is_empty() { CdcType::Nothing