diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3e0e2bd48..36d4f0e73 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -317,11 +317,12 @@ jobs: run: rustup update stable - run: cargo fmt --all -- --check - docs: - name: cargo doc - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Install Rust - run: rustup update nightly && rustup default nightly - - run: RUSTDOCFLAGS="-D warnings --cfg docsrs" cargo doc --workspace --no-deps --all-features + # TODO: upstream bug https://github.com/rust-lang/rust/issues/118670 + # docs: + # name: cargo doc + # runs-on: ubuntu-latest + # steps: + # - uses: actions/checkout@v4 + # - name: Install Rust + # run: rustup update nightly && rustup default nightly + # - run: RUSTDOCFLAGS="-D warnings --cfg docsrs" cargo doc --workspace --no-deps --all-features diff --git a/futures-test/src/lib.rs b/futures-test/src/lib.rs index 49f834846..91f5273f8 100644 --- a/futures-test/src/lib.rs +++ b/futures-test/src/lib.rs @@ -14,6 +14,7 @@ allow(dead_code, unused_assignments, unused_variables) ) ))] +#![allow(clippy::test_attr_in_doctest)] #[cfg(not(feature = "std"))] compile_error!( diff --git a/futures-util/src/io/chain.rs b/futures-util/src/io/chain.rs index 728a3d2dc..410ff0dc7 100644 --- a/futures-util/src/io/chain.rs +++ b/futures-util/src/io/chain.rs @@ -121,9 +121,7 @@ where if !*this.done_first { match ready!(this.first.poll_fill_buf(cx)?) { - buf if buf.is_empty() => { - *this.done_first = true; - } + [] => *this.done_first = true, buf => return Poll::Ready(Ok(buf)), } } diff --git a/futures-util/src/stream/futures_ordered.rs b/futures-util/src/stream/futures_ordered.rs index 3aaef8bde..2cc144e81 100644 --- a/futures-util/src/stream/futures_ordered.rs +++ b/futures-util/src/stream/futures_ordered.rs @@ -19,7 +19,8 @@ pin_project! { struct OrderWrapper { #[pin] data: T, // A future or a future's output - index: isize, + // Use i64 for index since isize may overflow in 32-bit targets. + index: i64, } } @@ -98,8 +99,8 @@ where pub struct FuturesOrdered { in_progress_queue: FuturesUnordered>, queued_outputs: BinaryHeap>, - next_incoming_index: isize, - next_outgoing_index: isize, + next_incoming_index: i64, + next_outgoing_index: i64, } impl Unpin for FuturesOrdered {}