Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions futures-test/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
allow(dead_code, unused_assignments, unused_variables)
)
))]
#![allow(clippy::test_attr_in_doctest)]

#[cfg(not(feature = "std"))]
compile_error!(
Expand Down
4 changes: 1 addition & 3 deletions futures-util/src/io/chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)),
}
}
Expand Down
7 changes: 4 additions & 3 deletions futures-util/src/stream/futures_ordered.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ pin_project! {
struct OrderWrapper<T> {
#[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,
}
}

Expand Down Expand Up @@ -98,8 +99,8 @@ where
pub struct FuturesOrdered<T: Future> {
in_progress_queue: FuturesUnordered<OrderWrapper<T>>,
queued_outputs: BinaryHeap<OrderWrapper<T::Output>>,
next_incoming_index: isize,
next_outgoing_index: isize,
next_incoming_index: i64,
next_outgoing_index: i64,
}

impl<T: Future> Unpin for FuturesOrdered<T> {}
Expand Down