Skip to content

Commit 5f9ec0c

Browse files
parmesantde-sh
andauthored
refactor: pattern match
Co-authored-by: Devdutt Shenoi <[email protected]> Signed-off-by: parmesant <[email protected]>
1 parent 83a319b commit 5f9ec0c

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/kafka.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -225,10 +225,9 @@ pub async fn setup_integration() {
225225
let mut stream = consumer.stream();
226226

227227
while let Ok(curr) = stream.next().await.unwrap() {
228-
match ingest_message(&stream_name, curr).await {
229-
Ok(_) => {}
230-
Err(err) => error!("Unable to ingest incoming kafka message- {err}"),
231-
};
228+
if let Err(err) = ingest_message(&stream_name, curr).await {
229+
error!("Unable to ingest incoming kafka message- {err}"),
230+
}
232231
}
233232
});
234233
}

0 commit comments

Comments
 (0)