Skip to content

Commit 897e9be

Browse files
committed
minor udpate / making create_client public at crate level
1 parent 90364ff commit 897e9be

File tree

3 files changed

+4
-8
lines changed

3 files changed

+4
-8
lines changed

src/consumer.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,13 +132,11 @@ impl ConsumerBuilder {
132132

133133
let collector = self.environment.options.client_options.collector.clone();
134134

135-
let client_uwrapped = self
135+
let client = self
136136
.environment
137137
.create_consumer_client(stream, self.client_provided_name.clone())
138138
.await?;
139139

140-
let client = client_uwrapped.clone();
141-
142140
let subscription_id = 1;
143141
let (tx, rx) = channel(10000);
144142
let consumer = Arc::new(ConsumerInternal {

src/environment.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ impl Environment {
3939
Ok(Environment { options })
4040
}
4141

42-
pub async fn create_producer_client(
42+
pub(crate) async fn create_producer_client(
4343
self,
4444
stream: &str,
4545
client_provided_name: String,
@@ -91,7 +91,7 @@ impl Environment {
9191
Ok(client)
9292
}
9393

94-
pub async fn create_consumer_client(
94+
pub(crate) async fn create_consumer_client(
9595
self,
9696
stream: &str,
9797
client_provided_name: String,

src/producer.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,13 +120,11 @@ impl<T> ProducerBuilder<T> {
120120

121121
let metrics_collector = self.environment.options.client_options.collector.clone();
122122

123-
let client_unwrapped = self
123+
let client = self
124124
.environment
125125
.create_producer_client(stream, self.client_provided_name.clone())
126126
.await?;
127127

128-
let client = client_unwrapped;
129-
130128
let mut publish_version = 1;
131129

132130
if self.filter_value_extractor.is_some() {

0 commit comments

Comments
 (0)