Skip to content

Commit

Permalink
remove dbg!s from examples
Browse files Browse the repository at this point in the history
  • Loading branch information
rgbkrk committed Dec 13, 2024
1 parent fda4fc8 commit fc5a169
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion examples/message_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ async fn main() -> Result<(), Box<dyn Error>> {

loop {
let mut repl: String = socket.recv().await?.try_into()?;
dbg!(&repl);
println!("Received: {}", repl);
repl.push_str(" Reply");
socket.send(repl.into()).await?;
}
Expand Down
2 changes: 1 addition & 1 deletion examples/socket_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ async fn main() -> Result<(), Box<dyn Error>> {
for _ in 0..10u64 {
socket.send("Hello".into()).await?;
let repl = socket.recv().await?;
dbg!(repl);
println!("Received: {:?}", repl);
}
Ok(())
}
2 changes: 1 addition & 1 deletion examples/socket_client_with_options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ async fn main() -> Result<(), Box<dyn Error>> {
for _ in 0..10u64 {
socket.send("Hello".into()).await?;
let repl = socket.recv().await?;
dbg!(repl);
println!("Received: {:?}", repl);
}
Ok(())
}
2 changes: 1 addition & 1 deletion examples/socket_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {

loop {
let mut repl: String = socket.recv().await?.try_into()?;
dbg!(&repl);
println!("Received: {:?}", repl);
repl.push_str(" Reply");
socket.send(repl.into()).await?;
}
Expand Down
2 changes: 1 addition & 1 deletion examples/stock_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
let price: u32 = rng.gen_range(1..100);
let mut m: ZmqMessage = ZmqMessage::from(*stock);
m.push_back(price.to_ne_bytes().to_vec().into());
dbg!(m.clone());
println!("Sending: {:?}", m);
socket.send(m).await?;
}
async_helpers::sleep(Duration::from_secs(1)).await;
Expand Down
3 changes: 2 additions & 1 deletion examples/weather_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ async fn main() -> Result<(), Box<dyn Error>> {
for i in 0..10 {
println!("Message {}", i);
let repl = socket.recv().await?;
dbg!(repl);

println!("Received: {:?}", repl);
}
Ok(())
}
5 changes: 3 additions & 2 deletions src/codec/zmq_codec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,8 @@ pub(crate) mod tests {
.decode(&mut bytes)
.expect("decode success")
.expect("single message");
dbg!(&message);

eprintln!(&message);

Check failure on line 181 in src/codec/zmq_codec.rs

View workflow job for this annotation

GitHub Actions / Test

format argument must be a string literal

Check failure on line 181 in src/codec/zmq_codec.rs

View workflow job for this annotation

GitHub Actions / Check and Lint

format argument must be a string literal
match message {
Message::Message(m) => {
assert_eq!(6, m.into_vecdeque().len());
Expand All @@ -200,7 +201,7 @@ pub(crate) mod tests {
.decode(&mut bytes)
.expect("decode success")
.expect("single message");
dbg!(&message);
eprintln!(&message);

Check failure on line 204 in src/codec/zmq_codec.rs

View workflow job for this annotation

GitHub Actions / Test

format argument must be a string literal

Check failure on line 204 in src/codec/zmq_codec.rs

View workflow job for this annotation

GitHub Actions / Check and Lint

format argument must be a string literal
assert_eq!(bytes.len(), 0);
match message {
Message::Message(m) => {
Expand Down

0 comments on commit fc5a169

Please sign in to comment.