From 6a9e0e00a80aa5ae899c6b297755bb88a73f4f00 Mon Sep 17 00:00:00 2001 From: Julio Biason Date: Thu, 18 Nov 2021 14:37:29 -0300 Subject: [PATCH] Reduced the number of stdout messages --- ms/server/src/main.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ms/server/src/main.rs b/ms/server/src/main.rs index 5930d2b..69775ed 100644 --- a/ms/server/src/main.rs +++ b/ms/server/src/main.rs @@ -37,7 +37,7 @@ async fn producer(sink: broadcast::Sender) { let messages = ["Hello world", "Goodbye Earth", "See you later alligator"]; for message in messages.iter().cycle() { match sink.send(Message::new(message)) { - Ok(_) => log::debug!("Send: {}", message), + Ok(_) => {} // log::debug!("Send: {}", message), Err(err) => log::error!("Error sending message: {:?}", err), } sleep(Duration::from_millis(500)).await; @@ -74,7 +74,7 @@ async fn worker(mut source: broadcast::Receiver, mut stream: TcpStream, /// Essa função existe porque o sender do broadcast precisa de pelo menos um listener. async fn consumer(mut receiver: broadcast::Receiver) { loop { - let message = receiver.recv().await.expect("Invalid message"); - log::debug!("Message: {:?}", message); + let _message = receiver.recv().await.expect("Invalid message"); + // log::debug!("Message: {:?}", message); } }