Skip to content

Commit c06159d

Browse files
committed
Make clippy happy
1 parent 9882d30 commit c06159d

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

examples/task_ventilator.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ mod async_helpers;
22

33
use rand::Rng;
44
use std::error::Error;
5-
use std::io::Read;
5+
use std::io::{BufRead, BufReader};
66

77
use zeromq::{Socket, SocketSend};
88

@@ -17,7 +17,10 @@ async fn main() -> Result<(), Box<dyn Error>> {
1717
sink.connect("tcp://127.0.0.1:5558").await?;
1818

1919
println!("Press Enter when the workers are ready: ");
20-
let _ = std::io::stdin().bytes().next();
20+
let stdin = std::io::stdin();
21+
let mut reader = BufReader::new(stdin);
22+
let mut line = String::new();
23+
let _ = reader.read_line(&mut line);
2124
println!("Sending tasks to workers…");
2225

2326
// The first message is "0" and signals start of batch

src/fair_queue.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ mod test {
332332
let result = Pin::new(&mut fair_queue).poll_next(&mut cx);
333333
match result {
334334
Poll::Pending => {} // Expected with noop_waker
335-
other => panic!("Expected Pending, got: {:#?}", other),
335+
other @ Poll::Ready(_) => panic!("Expected Pending, got: {:#?}", other),
336336
}
337337
}
338338

0 commit comments

Comments
 (0)