Skip to content

Commit

Permalink
simplify that
Browse files Browse the repository at this point in the history
  • Loading branch information
brayniac committed Oct 19, 2023
1 parent 6fe90d9 commit d0c2e4f
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/pubsub/kafka.rs
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,7 @@ async fn subscriber_task(client: Arc<StreamConsumer>, topics: Vec<String>) {
match client.recv().await {
Ok(message) => match message.payload_view::<[u8]>() {
Some(Ok(message)) => {
let mut message = message.to_owned();

match validator.validate(&mut message) {
match validator.validate(&mut message.to_owned()) {
Err(ValidationError::Unexpected) => {
error!("pubsub: invalid message received");
RESPONSE_EX.increment();
Expand Down

0 comments on commit d0c2e4f

Please sign in to comment.