|
1 | 1 | use rdkafka::{ |
2 | | - consumer::StreamConsumer, error::KafkaResult, producer::FutureProducer, ClientConfig, |
| 2 | + ClientConfig, consumer::StreamConsumer, error::KafkaResult, producer::FutureProducer, |
3 | 3 | }; |
4 | 4 | use serde::Deserialize; |
5 | 5 | use svix_bridge_types::{ReceiverOutput, SenderInput, SenderOutputOpts, TransformationConfig}; |
6 | 6 |
|
7 | | -use crate::{input::KafkaConsumer, KafkaProducer, Result}; |
| 7 | +use crate::{KafkaProducer, Result, input::KafkaConsumer}; |
8 | 8 |
|
9 | 9 | #[derive(Clone, Deserialize)] |
10 | 10 | #[serde(tag = "type")] |
@@ -56,10 +56,10 @@ impl KafkaInputOpts { |
56 | 56 | .set("enable.auto.commit", "false"); |
57 | 57 |
|
58 | 58 | security_protocol.apply(&mut config); |
59 | | - if let Some(debug_contexts) = debug_contexts { |
60 | | - if !debug_contexts.is_empty() { |
61 | | - config.set("debug", debug_contexts); |
62 | | - } |
| 59 | + if let Some(debug_contexts) = debug_contexts |
| 60 | + && !debug_contexts.is_empty() |
| 61 | + { |
| 62 | + config.set("debug", debug_contexts); |
63 | 63 | } |
64 | 64 |
|
65 | 65 | config.create() |
@@ -106,10 +106,10 @@ impl KafkaOutputOpts { |
106 | 106 | config.set("bootstrap.servers", bootstrap_brokers); |
107 | 107 |
|
108 | 108 | security_protocol.apply(&mut config); |
109 | | - if let Some(debug_contexts) = debug_contexts { |
110 | | - if !debug_contexts.is_empty() { |
111 | | - config.set("debug", debug_contexts); |
112 | | - } |
| 109 | + if let Some(debug_contexts) = debug_contexts |
| 110 | + && !debug_contexts.is_empty() |
| 111 | + { |
| 112 | + config.set("debug", debug_contexts); |
113 | 113 | } |
114 | 114 |
|
115 | 115 | config.create() |
|
0 commit comments