Skip to content

Commit

Permalink
Use broadcast::Receiver::recv instead of next
Browse files Browse the repository at this point in the history
On newer versions of Tokio the `Receiver` doesn't implement `Stream`.
  • Loading branch information
jvff committed Oct 21, 2021
1 parent 86d05c5 commit 9da067d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions tower-batch/src/worker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ use std::{
use futures::future::TryFutureExt;
use pin_project::pin_project;
use tokio::{
stream::StreamExt,
sync::mpsc,
time::{sleep, Sleep},
};
Expand Down Expand Up @@ -127,7 +126,7 @@ where
let mut pending_items = 0usize;
loop {
match timer {
None => match self.rx.next().await {
None => match self.rx.recv().await {
// The first message in a new batch.
Some(msg) => {
let span = msg.span;
Expand Down

0 comments on commit 9da067d

Please sign in to comment.