Skip to content

Commit

Permalink
rename to_go to remaining
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaron Schweiger authored and aschweig committed Oct 8, 2023
1 parent 9fa6a68 commit 5d2a8a7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tokio/src/sync/mpsc/chan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ impl<T, S: Semaphore> Rx<T, S> {
) -> Poll<usize> {
use super::block::Read;

let mut to_go = if limit > 0 { limit } else { super::BLOCK_CAP };
let mut remaining = if limit > 0 { limit } else { super::BLOCK_CAP };
let initial_length = buffer.len();

ready!(crate::trace::trace_leaf(cx));
Expand All @@ -318,10 +318,10 @@ impl<T, S: Semaphore> Rx<T, S> {
let rx_fields = unsafe { &mut *rx_fields_ptr };
macro_rules! try_recv {
() => {
while (to_go > 0) {
while (remaining > 0) {
match rx_fields.list.pop(&self.inner.tx) {
Some(Read::Value(value)) => {
to_go = to_go - 1;
remaining -= 1;
buffer.push(value);
}

Expand Down

0 comments on commit 5d2a8a7

Please sign in to comment.