We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e4aa659 commit 04d01a0Copy full SHA for 04d01a0
futures-util/src/stream/futures_ordered.rs
@@ -19,7 +19,8 @@ pin_project! {
19
struct OrderWrapper<T> {
20
#[pin]
21
data: T, // A future or a future's output
22
- index: isize,
+ // Use i64 for index since isize may overflow in 32-bit targets.
23
+ index: i64,
24
}
25
26
@@ -98,8 +99,8 @@ where
98
99
pub struct FuturesOrdered<T: Future> {
100
in_progress_queue: FuturesUnordered<OrderWrapper<T>>,
101
queued_outputs: BinaryHeap<OrderWrapper<T::Output>>,
- next_incoming_index: isize,
102
- next_outgoing_index: isize,
+ next_incoming_index: i64,
103
+ next_outgoing_index: i64,
104
105
106
impl<T: Future> Unpin for FuturesOrdered<T> {}
0 commit comments