diff --git a/futures-util/src/stream/futures_unordered/iter.rs b/futures-util/src/stream/futures_unordered/iter.rs index 7ac86229c2..f8d7321c15 100644 --- a/futures-util/src/stream/futures_unordered/iter.rs +++ b/futures-util/src/stream/futures_unordered/iter.rs @@ -46,7 +46,7 @@ impl Iterator for IntoIter { unsafe { // Moving out of the future is safe because it is `Unpin` - let future = (**task).future.get_mut().take().unwrap(); + let future = (*(**task).future.get()).take().unwrap(); // Mutable access to a previously shared `FuturesUnordered` implies // that the other threads already released the object before the