We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Unpin
FuturesUnordered::iter_mut
1 parent 0820382 commit f0604c2Copy full SHA for f0604c2
futures-util/src/stream/futures_unordered/iter_mut.rs
@@ -4,7 +4,7 @@ use super::node::Node;
4
5
#[derive(Debug)]
6
/// Mutable iterator over all futures in the unordered set.
7
-pub struct IterMut<'a, F: 'a> {
+pub struct IterMut<'a, F: 'a + Unpin> {
8
pub(super) node: *const Node<F>,
9
pub(super) len: usize,
10
pub(super) _marker: PhantomData<&'a mut FuturesUnordered<F>>
futures-util/src/stream/futures_unordered/mod.rs
@@ -149,7 +149,7 @@ impl<T> FuturesUnordered<T> {
149
}
150
151
/// Returns an iterator that allows modifying each future in the set.
152
- pub fn iter_mut(&mut self) -> IterMut<T> {
+ pub fn iter_mut(&mut self) -> IterMut<T> where T: Unpin {
153
IterMut {
154
node: self.head_all,
155
len: self.len,
0 commit comments