From 1d9e42e1e4294cdc483a9952a753a1728d098fc7 Mon Sep 17 00:00:00 2001 From: Richard Chien Date: Tue, 17 Dec 2024 14:42:46 +0800 Subject: [PATCH] fix clippy Signed-off-by: Richard Chien --- src/connector/src/parser/bytes_parser.rs | 1 - src/connector/src/parser/csv_parser.rs | 1 - src/connector/src/parser/debezium/debezium_parser.rs | 1 - src/connector/src/parser/debezium/mongo_json_parser.rs | 1 - src/connector/src/parser/debezium/simd_json_parser.rs | 1 - src/connector/src/parser/maxwell/simd_json_parser.rs | 1 - src/connector/src/parser/mod.rs | 2 +- 7 files changed, 1 insertion(+), 7 deletions(-) diff --git a/src/connector/src/parser/bytes_parser.rs b/src/connector/src/parser/bytes_parser.rs index 37bc099085c71..841dbfea4ab36 100644 --- a/src/connector/src/parser/bytes_parser.rs +++ b/src/connector/src/parser/bytes_parser.rs @@ -45,7 +45,6 @@ impl BytesAccessBuilder { #[cfg(test)] mod tests { - use itertools::Itertools; use risingwave_common::array::Op; use risingwave_common::row::Row; use risingwave_common::types::{DataType, ScalarImpl, ToOwnedDatum}; diff --git a/src/connector/src/parser/csv_parser.rs b/src/connector/src/parser/csv_parser.rs index d94f924da7a8f..3bb16b4bf60e6 100644 --- a/src/connector/src/parser/csv_parser.rs +++ b/src/connector/src/parser/csv_parser.rs @@ -175,7 +175,6 @@ impl ByteStreamSourceParser for CsvParser { #[cfg(test)] mod tests { - use itertools::Itertools; use risingwave_common::array::Op; use risingwave_common::row::Row; use risingwave_common::types::{DataType, ToOwnedDatum}; diff --git a/src/connector/src/parser/debezium/debezium_parser.rs b/src/connector/src/parser/debezium/debezium_parser.rs index cc228f8acd9f9..d17f34add0058 100644 --- a/src/connector/src/parser/debezium/debezium_parser.rs +++ b/src/connector/src/parser/debezium/debezium_parser.rs @@ -208,7 +208,6 @@ mod tests { use std::ops::Deref; use std::sync::Arc; - use itertools::Itertools; use risingwave_common::catalog::{ColumnCatalog, ColumnDesc, ColumnId, CDC_SOURCE_COLUMN_NUM}; use risingwave_common::row::Row; use risingwave_common::types::Timestamptz; diff --git a/src/connector/src/parser/debezium/mongo_json_parser.rs b/src/connector/src/parser/debezium/mongo_json_parser.rs index 53a81de389923..1d18fa5c53f0c 100644 --- a/src/connector/src/parser/debezium/mongo_json_parser.rs +++ b/src/connector/src/parser/debezium/mongo_json_parser.rs @@ -136,7 +136,6 @@ impl ByteStreamSourceParser for DebeziumMongoJsonParser { #[cfg(test)] mod tests { - use itertools::Itertools; use risingwave_common::array::Op; use risingwave_common::catalog::ColumnId; use risingwave_common::row::Row; diff --git a/src/connector/src/parser/debezium/simd_json_parser.rs b/src/connector/src/parser/debezium/simd_json_parser.rs index a7a2b8020ff09..7e713e1a29e72 100644 --- a/src/connector/src/parser/debezium/simd_json_parser.rs +++ b/src/connector/src/parser/debezium/simd_json_parser.rs @@ -107,7 +107,6 @@ impl AccessBuilder for DebeziumMongoJsonAccessBuilder { #[cfg(test)] mod tests { use chrono::{NaiveDate, NaiveTime}; - use itertools::Itertools; use risingwave_common::array::{Op, StructValue}; use risingwave_common::catalog::ColumnId; use risingwave_common::row::{OwnedRow, Row}; diff --git a/src/connector/src/parser/maxwell/simd_json_parser.rs b/src/connector/src/parser/maxwell/simd_json_parser.rs index 26377631c61f1..e3943480959c5 100644 --- a/src/connector/src/parser/maxwell/simd_json_parser.rs +++ b/src/connector/src/parser/maxwell/simd_json_parser.rs @@ -14,7 +14,6 @@ #[cfg(test)] mod tests { - use itertools::Itertools; use risingwave_common::array::Op; use risingwave_common::row::Row; use risingwave_common::types::{DataType, ScalarImpl, ToOwnedDatum}; diff --git a/src/connector/src/parser/mod.rs b/src/connector/src/parser/mod.rs index aca94d7d69a2c..70a5e8994ba1a 100644 --- a/src/connector/src/parser/mod.rs +++ b/src/connector/src/parser/mod.rs @@ -305,7 +305,7 @@ async fn into_chunk_stream_inner( let mut txn_started_in_last_batch = chunk_builder.is_in_transaction(); let process_time_ms = chrono::Utc::now().timestamp_millis(); - for msg in batch.into_iter() { + for msg in batch { if msg.is_cdc_heartbeat() { // ignore heartbeat messages continue;